Package net.kyori.adventure.nbt
Interface LongArrayBinaryTag
-
- All Superinterfaces:
ArrayBinaryTag
,BinaryTag
,BinaryTagLike
,net.kyori.examination.Examinable
,java.lang.Iterable<java.lang.Long>
public interface LongArrayBinaryTag extends ArrayBinaryTag, java.lang.Iterable<java.lang.Long>
A binary tag holding along
-array value.- Since:
- 4.0.0
- Since Minecraft:
- 1.12
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
forEachLong(@NotNull java.util.function.LongConsumer action)
Perform an action for every long in the backing array.long
get(int index)
Gets the value atindex
in this tag.@NotNull java.util.PrimitiveIterator.OfLong
iterator()
static @NotNull LongArrayBinaryTag
longArrayBinaryTag(long @NotNull ... value)
Creates a binary tag holding along
-array value.static @NotNull LongArrayBinaryTag
of(long @NotNull ... value)
Deprecated.for removal since 4.14.0, uselongArrayBinaryTag(long...)
instead.int
size()
Gets the length of the array.@NotNull java.util.Spliterator.OfLong
spliterator()
@NotNull java.util.stream.LongStream
stream()
Create a stream whose elements are the elements of this array tag.default @NotNull BinaryTagType<LongArrayBinaryTag>
type()
Gets the tag type.long @NotNull []
value()
Gets the value.-
Methods inherited from interface net.kyori.adventure.nbt.BinaryTag
asBinaryTag
-
-
-
-
Method Detail
-
longArrayBinaryTag
@NotNull static @NotNull LongArrayBinaryTag longArrayBinaryTag(long @NotNull ... value)
Creates a binary tag holding along
-array value.- Parameters:
value
- the value- Returns:
- a binary tag
- Since:
- 4.14.0
-
of
@Deprecated @ScheduledForRemoval(inVersion="5.0.0") @NotNull static @NotNull LongArrayBinaryTag of(long @NotNull ... value)
Deprecated.for removal since 4.14.0, uselongArrayBinaryTag(long...)
instead.Creates a binary tag holding along
-array value.- Parameters:
value
- the value- Returns:
- a binary tag
- Since:
- 4.0.0
-
type
@NotNull default @NotNull BinaryTagType<LongArrayBinaryTag> type()
Description copied from interface:BinaryTag
Gets the tag type.- Specified by:
type
in interfaceArrayBinaryTag
- Specified by:
type
in interfaceBinaryTag
- Returns:
- the tag type
-
value
long @NotNull [] value()
Gets the value.The returned array is a copy.
- Returns:
- the value
- Since:
- 4.0.0
-
size
int size()
Gets the length of the array.- Returns:
- value size
- Since:
- 4.2.0
-
get
long get(int index)
Gets the value atindex
in this tag.- Parameters:
index
- the index in the array- Returns:
- the long at the index in the array
- Throws:
java.lang.IndexOutOfBoundsException
- if index is < 0 or ≥size()
- Since:
- 4.2.0
-
iterator
@NotNull java.util.PrimitiveIterator.OfLong iterator()
The returned iterator is immutable.
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Long>
- Since:
- 4.2.0
-
spliterator
@NotNull java.util.Spliterator.OfLong spliterator()
- Specified by:
spliterator
in interfacejava.lang.Iterable<java.lang.Long>
-
stream
@NotNull @NotNull java.util.stream.LongStream stream()
Create a stream whose elements are the elements of this array tag.- Returns:
- a new stream
- Since:
- 4.2.0
-
forEachLong
void forEachLong(@NotNull @NotNull java.util.function.LongConsumer action)
Perform an action for every long in the backing array.- Parameters:
action
- the action to perform- Since:
- 4.2.0
-
-