Record Class Optic.CompositionOptic<Proof extends K1,S,T,A,B>

java.lang.Object
java.lang.Record
com.mojang.datafixers.optics.Optic.CompositionOptic<Proof,S,T,A,B>
All Implemented Interfaces:
Optic<Proof,S,T,A,B>
Enclosing interface:
Optic<Proof extends K1,S,T,A,B>

public static record Optic.CompositionOptic<Proof extends K1,S,T,A,B>(List<? extends Optic<? super Proof extends K1,?,?,?,?>> optics) extends Record implements Optic<Proof,S,T,A,B>
  • Constructor Details

    • CompositionOptic

      public CompositionOptic(List<? extends Optic<? super Proof,?,?,?,?>> optics)
      Creates an instance of a CompositionOptic record class.
      Parameters:
      optics - the value for the optics record component
  • Method Details

    • eval

      public <P extends K2> Function<App2<P,A,B>,App2<P,S,T>> eval(App<? extends Proof,P> proof)
      Specified by:
      eval in interface Optic<Proof extends K1,S,T,A,B>
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • optics

      public List<? extends Optic<? super Proof,?,?,?,?>> optics()
      Returns the value of the optics record component.
      Returns:
      the value of the optics record component