Class ArrayTag<T>
java.lang.Object
org.moddingx.launcherlib.nbt.tag.ArrayTag<T>
- Direct Known Subclasses:
ByteArrayTag, IntArrayTag, ListTag, LongArrayTag
public abstract sealed class ArrayTag<T>
extends Object
implements Tag, Iterable<T>
permits ByteArrayTag, IntArrayTag, ListTag, LongArrayTag
Base class for all list-like tags.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new element to this tag at the given index.voidAdds a new element to this tag.voidAdds multiple new elements to this tag at the given index.voidAdds multiple new elements to this tag.voidclear()Removes all elements from this tag.copy()Makes a copy of this tag.get(int idx) Gets the element at the given index.iterator()listIterator(int idx) protected voidremove(int idx) Removes the value at the given index.voidChanges the value at the given index.intsize()Gets the size of this tag.stream()final StringtoString()type()Gets theTagTypefor this tag.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
elements
-
-
Constructor Details
-
ArrayTag
-
-
Method Details
-
type
-
copy
-
toString
-
size
public int size()Gets the size of this tag. -
get
Gets the element at the given index. -
add
Adds a new element to this tag. -
add
Adds a new element to this tag at the given index. -
addAll
-
addAll
-
set
Changes the value at the given index. -
remove
-
clear
public void clear()Removes all elements from this tag. -
iterator
-
listIterator
-
listIterator
-
stream
-
onAdd
-