Interface ByteArrayBinaryTag

All Superinterfaces:
ArrayBinaryTag, BinaryTag, BinaryTagLike, net.kyori.examination.Examinable, Iterable<Byte>

public interface ByteArrayBinaryTag
extends ArrayBinaryTag, Iterable<Byte>
A binary tag holding a byte-array value.
Since:
4.0.0
  • Method Summary

    Modifier and Type Method Description
    byte get​(int index)
    Gets the value at index in this tag.
    static @NonNull ByteArrayBinaryTag of​(byte @NonNull ... value)
    Creates a binary tag holding a byte-array value.
    int size()
    Get the size of the array.
    default @NonNull BinaryTagType<ByteArrayBinaryTag> type()
    Gets the tag type.
    byte @NonNull [] value()
    Gets the value.

    Methods inherited from interface net.kyori.adventure.nbt.BinaryTag

    asBinaryTag

    Methods inherited from interface net.kyori.examination.Examinable

    examinableName, examinableProperties, examine

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • of

      static @NonNull ByteArrayBinaryTag of​(byte @NonNull ... value)
      Creates a binary tag holding a byte-array value.
      Parameters:
      value - the value
      Returns:
      a binary tag
      Since:
      4.0.0
    • type

      default @NonNull BinaryTagType<ByteArrayBinaryTag> type()
      Description copied from interface: BinaryTag
      Gets the tag type.
      Specified by:
      type in interface ArrayBinaryTag
      Specified by:
      type in interface BinaryTag
      Returns:
      the tag type
    • value

      byte @NonNull [] value()
      Gets the value.

      The returned array is a copy.

      Returns:
      the value
      Since:
      4.0.0
    • size

      int size()
      Get the size of the array.
      Returns:
      array size
      Since:
      4.2.0
    • get

      byte get​(int index)
      Gets the value at index in this tag.
      Parameters:
      index - the index in the array
      Returns:
      the byte at the index in the array
      Throws:
      IndexOutOfBoundsException - if index is < 0 or ≥ size()
      Since:
      4.2.0