Class BinaryTagType<T extends BinaryTag>

  • Type Parameters:
    T - the tag type
    All Implemented Interfaces:
    java.util.function.Predicate<BinaryTagType<? extends BinaryTag>>

    public abstract class BinaryTagType<T extends BinaryTag>
    extends java.lang.Object
    implements java.util.function.Predicate<BinaryTagType<? extends BinaryTag>>
    A binary tag type.
    Since:
    4.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      BinaryTagType()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract byte id()
      Gets the id.
      abstract T read​(@NotNull java.io.DataInput input)
      Reads a tag.
      boolean test​(BinaryTagType<? extends BinaryTag> that)  
      abstract void write​(T tag, @NotNull java.io.DataOutput output)
      Writes a tag.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
    • Constructor Detail

      • BinaryTagType

        public BinaryTagType()
    • Method Detail

      • id

        public abstract byte id()
        Gets the id.
        Returns:
        the id
        Since:
        4.0.0
      • read

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

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