Constructors for Prism.
Attributes
- Companion
- trait
- Source
- Optic.scala
- Graph
-
- Supertypes
- Self type
-
Prism.type
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The name of the type.
Value members
Concrete methods
Creates a prism on the case focusTerm of the variant source. The case is looked up by the term's name, so focusTerm must be one of source's cases. If it is not, this method throws ArrayIndexOutOfBoundsException (see docs/dev/issues.md). Reflect.Variant#prismByName and the $ macro of CompanionOptics check the case for you.
Creates a prism on the case focusTerm of the variant source. The case is looked up by the term's name, so focusTerm must be one of source's cases. If it is not, this method throws ArrayIndexOutOfBoundsException (see docs/dev/issues.md). Reflect.Variant#prismByName and the $ macro of CompanionOptics check the case for you.
Attributes
- Throws
-
java.lang.ArrayIndexOutOfBoundsException
if
sourcehas no case named likefocusTermjava.lang.IllegalArgumentExceptionif
sourceorfocusTermis null - Source
- Optic.scala
Composes two prisms: the result focuses on the case A of first's case T. It is the same as first(second).
Composes two prisms: the result focuses on the case A of first's case T. It is the same as first(second).
Attributes
- Throws
-
java.lang.IllegalArgumentException
if
firstorsecondis null - Source
- Optic.scala