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 thenameToStorerecord component.private final Dictionary.Entry<S, T> The field for theruleToParserecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenameToStorerecord component.booleanparse(ParseState<S> p_409926_, Scope p_409751_, Control p_409959_) Returns the value of theruleToParserecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ruleToParse
The field for theruleToParserecord component. -
nameToStore
The field for thenameToStorerecord component.
-
-
Constructor Details
-
Reference
Reference(Dictionary.Entry<S, T> ruleToParse, Atom<T> nameToStore) Creates an instance of aReferencerecord class.- Parameters:
ruleToParse- the value for theruleToParserecord componentnameToStore- the value for thenameToStorerecord 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 theruleToParserecord component.- Returns:
- the value of the
ruleToParserecord component
-
nameToStore
Returns the value of thenameToStorerecord component.- Returns:
- the value of the
nameToStorerecord component
-