Record Class SnbtGrammar.IntegerLiteral
java.lang.Object
java.lang.Record
net.minecraft.nbt.SnbtGrammar.IntegerLiteral
- Enclosing class:
SnbtGrammar
private static record SnbtGrammar.IntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SnbtGrammar.BaseThe field for thebaserecord component.private final StringThe field for thedigitsrecord component.private final SnbtGrammar.SignThe field for thesignrecord component.private final SnbtGrammar.IntegerSuffixThe field for thesuffixrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix) Creates an instance of aIntegerLiteralrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()Returns the value of thebaserecord component.private String<T> @Nullable Tcreate(com.mojang.serialization.DynamicOps<T> ops, SnbtGrammar.TypeSuffix type, ParseState<?> state) <T> @Nullable Tcreate(com.mojang.serialization.DynamicOps<T> ops, ParseState<?> state) digits()Returns the value of thedigitsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sign()Returns the value of thesignrecord component.private SnbtGrammar.SignedPrefixsuffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sign
The field for thesignrecord component. -
base
The field for thebaserecord component. -
digits
The field for thedigitsrecord component. -
suffix
The field for thesuffixrecord component.
-
-
Constructor Details
-
IntegerLiteral
private IntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix) Creates an instance of aIntegerLiteralrecord class.- Parameters:
sign- the value for thesignrecord componentbase- the value for thebaserecord componentdigits- the value for thedigitsrecord componentsuffix- the value for thesuffixrecord component
-
-
Method Details
-
signedOrDefault
-
cleanupDigits
-
create
-
create
public <T> @Nullable T create(com.mojang.serialization.DynamicOps<T> ops, SnbtGrammar.TypeSuffix type, ParseState<?> state) -
toString
-
hashCode
-
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). -
sign
Returns the value of thesignrecord component.- Returns:
- the value of the
signrecord component
-
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
digits
Returns the value of thedigitsrecord component.- Returns:
- the value of the
digitsrecord component
-
suffix
Returns the value of thesuffixrecord component.- Returns:
- the value of the
suffixrecord component
-