Constructors for Optional: compositions of two optics that give an optional, and optionals on an index, a map key or a wrapped value.
Attributes
- Companion
- trait
- Source
- Optic.scala
- Graph
-
- Supertypes
- Self type
-
Optional.type
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The name of the type.
Value members
Concrete methods
Composes an optional with a lens. The same as first(second).
Composes an optional with a lens. The same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala
Composes an optional with a prism. The same as first(second).
Composes an optional with a prism. The same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala
Composes two optionals. The same as first(second).
Composes two optionals. The same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala
Composes a lens with a prism. The same as first(second).
Composes a lens with a prism. The same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala
Composes a lens with an optional. The same as first(second).
Composes a lens with an optional. The same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala
Composes a prism with a lens. The same as first(second).
Composes a prism with a lens. The same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala
Composes a prism with an optional. The same as first(second).
Composes a prism with an optional. The same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala
Creates an optional on the element at index of a sequence. A sequence with index elements or fewer has no focus (OpticCheck.SequenceIndexOutOfBounds).
Creates an optional on the element at index of a sequence. A sequence with index elements or fewer has no focus (OpticCheck.SequenceIndexOutOfBounds).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
seqis null orindexis negative - Source
- Optic.scala
Creates an optional on the value at key in a map. A map without key has no focus (OpticCheck.MissingKey), and replace does not add the key.
Creates an optional on the value at key in a map. A map without key has no focus (OpticCheck.MissingKey), and replace does not add the key.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
mapis null - Source
- Optic.scala
Creates an optional on the value inside a wrapper, such as a schema built with Schema#transform. It reads with the wrapper's unwrap and writes with its wrap. When either throws a SchemaError, the focus counts as missing (OpticCheck.WrappingError); other exceptions propagate.
Creates an optional on the value inside a wrapper, such as a schema built with Schema#transform. It reads with the wrapper's unwrap and writes with its wrap. When either throws a SchemaError, the focus counts as missing (OpticCheck.WrappingError); other exceptions propagate.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
wrapperis null - Source
- Optic.scala