Record Class SnbtGrammar.IntegerLiteral

java.lang.Object
java.lang.Record
net.minecraft.nbt.SnbtGrammar.IntegerLiteral
Enclosing class:
SnbtGrammar

static record SnbtGrammar.IntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix) extends Record
  • Field Details

    • sign

      private final SnbtGrammar.Sign sign
      The field for the sign record component.
    • base

      private final SnbtGrammar.Base base
      The field for the base record component.
    • digits

      private final String digits
      The field for the digits record component.
    • suffix

      private final SnbtGrammar.IntegerSuffix suffix
      The field for the suffix record component.
  • Constructor Details

    • IntegerLiteral

      IntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix)
      Creates an instance of a IntegerLiteral record class.
      Parameters:
      sign - the value for the sign record component
      base - the value for the base record component
      digits - the value for the digits record component
      suffix - the value for the suffix record component
  • Method Details

    • signedOrDefault

      private SnbtGrammar.SignedPrefix signedOrDefault()
    • cleanupDigits

      private String cleanupDigits(SnbtGrammar.Sign p_409828_)
    • create

      @Nullable public <T> T create(com.mojang.serialization.DynamicOps<T> p_410386_, ParseState<?> p_409584_)
    • create

      @Nullable public <T> T create(com.mojang.serialization.DynamicOps<T> p_409628_, SnbtGrammar.TypeSuffix p_410472_, ParseState<?> p_410023_)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sign

      public SnbtGrammar.Sign sign()
      Returns the value of the sign record component.
      Returns:
      the value of the sign record component
    • base

      public SnbtGrammar.Base base()
      Returns the value of the base record component.
      Returns:
      the value of the base record component
    • digits

      public String digits()
      Returns the value of the digits record component.
      Returns:
      the value of the digits record component
    • suffix

      public SnbtGrammar.IntegerSuffix suffix()
      Returns the value of the suffix record component.
      Returns:
      the value of the suffix record component