Interface NumberBinaryTag

All Superinterfaces:
BinaryTag, BinaryTagLike
All Known Subinterfaces:
ByteBinaryTag, DoubleBinaryTag, FloatBinaryTag, IntBinaryTag, LongBinaryTag, ShortBinaryTag

public sealed interface NumberBinaryTag extends BinaryTag permits ByteBinaryTag, DoubleBinaryTag, FloatBinaryTag, IntBinaryTag, LongBinaryTag, ShortBinaryTag
A numeric binary tag.
Since:
4.0.0
  • Method Details

    • type

      BinaryTagType<? extends NumberBinaryTag> type()
      Description copied from interface: BinaryTag
      Gets the tag type.
      Specified by:
      type in interface BinaryTag
      Returns:
      the tag type
    • byteValue

      byte byteValue()
      Gets the value as a byte.
      Returns:
      the value as a byte
      Since:
      4.0.0
    • doubleValue

      double doubleValue()
      Gets the value as a double.
      Returns:
      the value as a double
      Since:
      4.0.0
    • floatValue

      float floatValue()
      Gets the value as a float.
      Returns:
      the value as a float
      Since:
      4.0.0
    • intValue

      int intValue()
      Gets the value as a int.
      Returns:
      the value as a int
      Since:
      4.0.0
    • longValue

      long longValue()
      Gets the value as a long.
      Returns:
      the value as a long
      Since:
      4.0.0
    • shortValue

      short shortValue()
      Gets the value as a short.
      Returns:
      the value as a short
      Since:
      4.0.0
    • numberValue

      Number numberValue()
      Gets the value as a Number.
      Returns:
      the value as a Number
      Since:
      4.21.0