Constructors for Traversal: compositions of two optics that give a traversal, and traversals over sequences and maps.
Attributes
- Companion
- trait
- Source
- Optic.scala
- Graph
-
- Supertypes
- Self type
-
Traversal.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 two traversals. The same as first(second).
Composes a traversal with a lens. The same as first(second).
Composes a traversal with a prism. The same as first(second).
Composes a traversal with an optional. The same as first(second).
Composes a lens with a traversal. The same as first(second).
Composes a prism with a traversal. The same as first(second).
Composes an optional with a traversal. The same as first(second).
Creates a traversal on the elements at indices of a sequence, visited in increasing index order whatever the order of indices. Indices past the end of a sequence are skipped; check reports them as OpticCheck.SequenceIndexOutOfBounds. When another step follows atIndices and the sequence is not indexed (a List, for example), check also reports reachable indices after the first as out of bounds; fold and modify are not affected (a bug, see docs/dev/issues.md).
Creates a traversal on the elements at indices of a sequence, visited in increasing index order whatever the order of indices. Indices past the end of a sequence are skipped; check reports them as OpticCheck.SequenceIndexOutOfBounds. When another step follows atIndices and the sequence is not indexed (a List, for example), check also reports reachable indices after the first as out of bounds; fold and modify are not affected (a bug, see docs/dev/issues.md).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
seqorindicesis null,indicesis empty, or it holds a negative or a repeated index - Source
- Optic.scala
Creates a traversal on the values at keys in a map, visited in the order of keys. Keys the map does not have are skipped; check reports them as OpticCheck.MissingKey.
Creates a traversal on the values at keys in a map, visited in the order of keys. Keys the map does not have are skipped; check reports them as OpticCheck.MissingKey.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
maporkeysis null, orkeysis empty - Source
- Optic.scala
Creates a traversal over every element of a List whose elements have the schema reflect.
Creates a traversal over every element of a List whose elements have the schema reflect.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
reflectis null - Source
- Optic.scala
Creates a traversal over every key of a map. modify rebuilds the map with the new keys.
Creates a traversal over every key of a map. modify rebuilds the map with the new keys.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
mapis null - Source
- Optic.scala
Creates a traversal over every value of a map.
Creates a traversal over every value of a map.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
mapis null - Source
- Optic.scala
Creates a traversal over every element of a sequence, such as a List, Vector, Set or Chunk.
Creates a traversal over every element of a sequence, such as a List, Vector, Set or Chunk.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
seqis null - Source
- Optic.scala
Creates a traversal over every element of a Set whose elements have the schema reflect.
Creates a traversal over every element of a Set whose elements have the schema reflect.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
reflectis null - Source
- Optic.scala
Creates a traversal over every element of a Vector whose elements have the schema reflect.
Creates a traversal over every element of a Vector whose elements have the schema reflect.
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
reflectis null - Source
- Optic.scala