Record Class ErrorEntry<S>
java.lang.Object
java.lang.Record
net.minecraft.util.parsing.packrat.ErrorEntry<S>
public record ErrorEntry<S>(int cursor, SuggestionSupplier<S> suggestions, Object reason)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thecursor
record component.private final Object
The field for thereason
record component.private final SuggestionSupplier
<S> The field for thesuggestions
record component. -
Constructor Summary
ConstructorDescriptionErrorEntry
(int cursor, SuggestionSupplier<S> suggestions, Object reason) Creates an instance of aErrorEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
cursor()
Returns the value of thecursor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.reason()
Returns the value of thereason
record component.Returns the value of thesuggestions
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
cursor
private final int cursorThe field for thecursor
record component. -
suggestions
The field for thesuggestions
record component. -
reason
The field for thereason
record component.
-
-
Constructor Details
-
ErrorEntry
Creates an instance of aErrorEntry
record class.- Parameters:
cursor
- the value for thecursor
record componentsuggestions
- the value for thesuggestions
record componentreason
- the value for thereason
record component
-
-
Method Details
-
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 '=='. -
cursor
public int cursor()Returns the value of thecursor
record component.- Returns:
- the value of the
cursor
record component
-
suggestions
Returns the value of thesuggestions
record component.- Returns:
- the value of the
suggestions
record component
-
reason
Returns the value of thereason
record component.- Returns:
- the value of the
reason
record component
-