Record Class Dictionary.Reference<S,T>
java.lang.Object
java.lang.Record
net.minecraft.util.parsing.packrat.Dictionary.Reference<S,T>
- All Implemented Interfaces:
Term<S>
- Enclosing class:
Dictionary<S>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.parsing.packrat.Term
Term.Alternative<S>, Term.LookAhead<S>, Term.Marker<S,
T>, Term.Maybe<S>, Term.Repeated<S, T>, Term.RepeatedWithSeparator<S, T>, Term.Sequence<S> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thenameToStore
record component.private final Dictionary.Entry
<S, T> The field for theruleToParse
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thenameToStore
record component.boolean
parse
(ParseState<S> p_409926_, Scope p_409751_, Control p_409959_) Returns the value of theruleToParse
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
ruleToParse
The field for theruleToParse
record component. -
nameToStore
The field for thenameToStore
record component.
-
-
Constructor Details
-
Reference
Reference(Dictionary.Entry<S, T> ruleToParse, Atom<T> nameToStore) Creates an instance of aReference
record class.- Parameters:
ruleToParse
- the value for theruleToParse
record componentnameToStore
- the value for thenameToStore
record component
-
-
Method Details
-
parse
-
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)
. -
ruleToParse
Returns the value of theruleToParse
record component.- Returns:
- the value of the
ruleToParse
record component
-
nameToStore
Returns the value of thenameToStore
record component.- Returns:
- the value of the
nameToStore
record component
-