Package net.kyori.adventure.nbt
Interface ByteArrayBinaryTag
-
- All Superinterfaces:
ArrayBinaryTag,BinaryTag,BinaryTagLike,net.kyori.examination.Examinable,java.lang.Iterable<java.lang.Byte>
public interface ByteArrayBinaryTag extends ArrayBinaryTag, java.lang.Iterable<java.lang.Byte>
A binary tag holding abyte-array value.- Since:
- 4.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static @NotNull ByteArrayBinaryTagbyteArrayBinaryTag(byte @NotNull ... value)Creates a binary tag holding abyte-array value.byteget(int index)Gets the value atindexin this tag.static @NotNull ByteArrayBinaryTagof(byte @NotNull ... value)Deprecated.for removal since 4.14.0, usebyteArrayBinaryTag(byte...)instead.intsize()Get the size of the array.default @NotNull BinaryTagType<ByteArrayBinaryTag>type()Gets the tag type.byte @NotNull []value()Gets the value.-
Methods inherited from interface net.kyori.adventure.nbt.BinaryTag
asBinaryTag
-
-
-
-
Method Detail
-
byteArrayBinaryTag
@NotNull static @NotNull ByteArrayBinaryTag byteArrayBinaryTag(byte @NotNull ... value)
Creates a binary tag holding abyte-array value.- Parameters:
value- the value- Returns:
- a binary tag
- Since:
- 4.14.0
-
of
@Deprecated @ScheduledForRemoval(inVersion="5.0.0") @NotNull static @NotNull ByteArrayBinaryTag of(byte @NotNull ... value)
Deprecated.for removal since 4.14.0, usebyteArrayBinaryTag(byte...)instead.Creates a binary tag holding abyte-array value.- Parameters:
value- the value- Returns:
- a binary tag
- Since:
- 4.0.0
-
type
@NotNull default @NotNull BinaryTagType<ByteArrayBinaryTag> type()
Description copied from interface:BinaryTagGets the tag type.- Specified by:
typein interfaceArrayBinaryTag- Specified by:
typein interfaceBinaryTag- Returns:
- the tag type
-
value
byte @NotNull [] 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 atindexin this tag.- Parameters:
index- the index in the array- Returns:
- the byte at the index in the array
- Throws:
java.lang.IndexOutOfBoundsException- if index is < 0 or ≥size()- Since:
- 4.2.0
-
-