com.jnape.palatable.lambda.optics.lenses

## Class SetLens

- java.lang.Object
- - com.jnape.palatable.lambda.optics.lenses.SetLens

-     public final class SetLens
      extends Object

  Lenses that operate on `Set`s.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <A> Lens.Simple<Set<A>,Boolean>` | `contains(A a)` A lens that focuses on whether a `Set` contains some value `a`.
    `static <A,SetA extends Set<A>> Lens.Simple<SetA,Boolean>` | `contains(Fn1<? super SetA,? extends SetA> copyFn, A a)` A lens that focuses on whether a `Set` contains some value `a`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### contains

          public static <A,SetA extends Set<A>> Lens.Simple<SetA,Boolean> contains(Fn1<? super SetA,? extends SetA> copyFn,
                                                                                   A a)

      A lens that focuses on whether a `Set` contains some value `a`. Note that `copyFn` is used to avoid mutating the `Set` in question.
      Type Parameters:
        `A` - the value type
        `SetA` - the set to focus on
      Parameters:
        `copyFn` - the copy function
        `a` - the value in question
      Returns:
        a lens that focuses on a value's inclusion in a given `Set`

    - #### contains

          public static <A> Lens.Simple<Set<A>,Boolean> contains(A a)

      A lens that focuses on whether a `Set` contains some value `a`. Like `contains(Fn1, Object)` but with an implicit copy function that produces ``HashSet`s`.
      Type Parameters:
        `A` - the value type
      Parameters:
        `a` - the value in question
      Returns:
        a lens that focuses on a value's inclusion in a given `Set`