Package com.mojang.datafixers
Record Class TypedOptic.Element<S,T,A,B>
java.lang.Object
java.lang.Record
com.mojang.datafixers.TypedOptic.Element<S,T,A,B>
- Enclosing class:
- TypedOptic<S,
T, A, B>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaType()
Returns the value of theaType
record component.bType()
Returns the value of thebType
record component.<S2,
T2> TypedOptic.Element<S2, T2, A, B> castOuterUnchecked
(Type<S2> sType, Type<T2> tType) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.optic()
Returns the value of theoptic
record component.sType()
Returns the value of thesType
record component.toString()
Returns a string representation of this record class.tType()
Returns the value of thetType
record component.
-
Constructor Details
-
Element
Creates an instance of aElement
record class.- Parameters:
sType
- the value for thesType
record componenttType
- the value for thetType
record componentaType
- the value for theaType
record componentbType
- the value for thebType
record componentoptic
- the value for theoptic
record component
-
-
Method Details
-
castOuterUnchecked
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
sType
Returns the value of thesType
record component.- Returns:
- the value of the
sType
record component
-
tType
Returns the value of thetType
record component.- Returns:
- the value of the
tType
record component
-
aType
Returns the value of theaType
record component.- Returns:
- the value of the
aType
record component
-
bType
Returns the value of thebType
record component.- Returns:
- the value of the
bType
record component
-
optic
Returns the value of theoptic
record component.- Returns:
- the value of the
optic
record component
-