Record Class ReplacementMatchInfo
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.recipe.match.ReplacementMatchInfo
public record ReplacementMatchInfo(ReplacementMatch match, boolean exact, Optional<RecipeComponent<?>> componentType)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ReplacementMatchInfostatic final dev.latvian.mods.rhino.type.RecordTypeInfo -
Constructor Summary
ConstructorsConstructorDescriptionReplacementMatchInfo(ReplacementMatch match, boolean exact, Optional<RecipeComponent<?>> componentType) Creates an instance of aReplacementMatchInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.booleanexact()Returns the value of theexactrecord component.final inthashCode()Returns a hash code value for this object.match()Returns the value of thematchrecord component.toString()Returns a string representation of this record class.static ReplacementMatchInfo
-
Field Details
-
TYPE_INFO
public static final dev.latvian.mods.rhino.type.RecordTypeInfo TYPE_INFO -
NONE
-
-
Constructor Details
-
ReplacementMatchInfo
public ReplacementMatchInfo(ReplacementMatch match, boolean exact, Optional<RecipeComponent<?>> componentType) Creates an instance of aReplacementMatchInforecord class.- Parameters:
match- the value for thematchrecord componentexact- the value for theexactrecord componentcomponentType- the value for thecomponentTyperecord component
-
-
Method Details
-
wrap
public static ReplacementMatchInfo wrap(dev.latvian.mods.rhino.Context cx, Object o, dev.latvian.mods.rhino.type.TypeInfo target) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
match
Returns the value of thematchrecord component.- Returns:
- the value of the
matchrecord component
-
exact
public boolean exact()Returns the value of theexactrecord component.- Returns:
- the value of the
exactrecord component
-
componentType
Returns the value of thecomponentTyperecord component.- Returns:
- the value of the
componentTyperecord component
-