Record Class RecursivePoint
java.lang.Object
java.lang.Record
com.mojang.datafixers.types.templates.RecursivePoint
- All Implemented Interfaces:
TypeTemplate
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionRecursivePoint
(int index) Creates an instance of aRecursivePoint
record class. -
Method Summary
Modifier and TypeMethodDescriptionapply
(TypeFamily family) <A,
B> FamilyOptic<A, B> applyO
(FamilyOptic<A, B> input, Type<A> aType, Type<B> bType) <S,
T> RewriteResult<S, T> cap
(TypeFamily family, RewriteResult<S, T> result) final boolean
Indicates whether some other object is "equal to" this one.<FT,
FR> Either<TypeTemplate, Type.FieldNotFoundException> findFieldOrType
(int index, String name, Type<FT> type, Type<FR> resultType) final int
hashCode()
Returns a hash code value for this object.IntFunction<RewriteResult<?,
?>> hmap
(TypeFamily family, IntFunction<RewriteResult<?, ?>> function) int
index()
Returns the value of theindex
record component.int
size()
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mojang.datafixers.types.templates.TypeTemplate
toSimpleType
-
Constructor Details
-
RecursivePoint
public RecursivePoint(int index) Creates an instance of aRecursivePoint
record class.- Parameters:
index
- the value for theindex
record component
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceTypeTemplate
-
apply
- Specified by:
apply
in interfaceTypeTemplate
-
applyO
- Specified by:
applyO
in interfaceTypeTemplate
-
findFieldOrType
public <FT,FR> Either<TypeTemplate,Type.FieldNotFoundException> findFieldOrType(int index, @Nullable String name, Type<FT> type, Type<FR> resultType) - Specified by:
findFieldOrType
in interfaceTypeTemplate
-
hmap
public IntFunction<RewriteResult<?,?>> hmap(TypeFamily family, IntFunction<RewriteResult<?, ?>> function) - Specified by:
hmap
in interfaceTypeTemplate
-
cap
-
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 with '=='. -
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-