Interface BinaryTagType<T extends BinaryTag>

Type Parameters:
T - the tag type
All Superinterfaces:
Predicate<BinaryTagType<? extends BinaryTag>>

public sealed interface BinaryTagType<T extends BinaryTag> extends Predicate<BinaryTagType<? extends BinaryTag>>
A binary tag type.
Since:
4.0.0
  • Method Details

    • binaryTagType

      static BinaryTagType<? extends BinaryTag> binaryTagType(byte id)
      Returns the binary tag type for the given id.
      Parameters:
      id - the id
      Returns:
      the binary tag type
      Since:
      4.0.0
    • id

      byte id()
      Gets the id.
      Returns:
      the id
      Since:
      4.0.0
    • numeric

      boolean numeric()
      If this tag type is numeric.
      Returns:
      if this tag type numeric
      Since:
      4.0.0
    • read

      T read(DataInput input) throws IOException
      Reads a tag.
      Parameters:
      input - the input
      Returns:
      the tag
      Throws:
      IOException - if an exception was encountered while reading
      Since:
      4.0.0
    • write

      void write(T tag, DataOutput output) throws IOException
      Writes a tag.
      Parameters:
      tag - the tag
      output - the output
      Throws:
      IOException - if an exception was encountered while writing
      Since:
      4.0.0