T - public abstract class NBTList<T> extends Object implements List<T>, ReadWriteNBTList<T>
| Modifier and Type | Field and Description |
|---|---|
protected Object |
listObject |
| Modifier | Constructor and Description |
|---|---|
protected |
NBTList(NBTCompound owner,
String name,
NBTType type,
Object list) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T element)
Adds the specified element at the specified position in this list.
|
boolean |
add(T element)
Adds the specified element to this set if it is not already present.
|
boolean |
addAll(Collection<? extends T> c)
Adds all of the elements in the specified collection to this collection.
|
boolean |
addAll(int index,
Collection<? extends T> c)
Inserts all of the elements in the specified collection into this list,
starting at the specified position.
|
protected abstract Object |
asTag(T object) |
void |
clear()
Clears the contents of the list
|
boolean |
contains(Object o)
Returns true if this list contains the specified element.
|
boolean |
containsAll(Collection<?> c)
Returns true if this collection contains all of the elements in the specified
collection
|
String |
getName() |
NBTCompound |
getParent() |
NBTType |
getType()
Returns the type of this tag
|
int |
indexOf(Object o)
Returns the index of the first occurrence of the specified element in this
list, or -1 if this list does not contain the element.
|
boolean |
isEmpty()
Returns true if the list is empty, false otherwise.
|
Iterator<T> |
iterator() |
int |
lastIndexOf(Object o)
Returns the index of the last occurrence of the specified element in this
list, or -1 if this list does not contain the element
|
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int startIndex)
Returns a list iterator over the elements in this list (in proper sequence),
starting at the specified position in the list
|
T |
remove(int i)
Remove the element at index i and return it.
|
boolean |
remove(Object o)
Removes the first occurrence of the specified element from this list, if it
is present.
|
boolean |
removeAll(Collection<?> c)
Removes from this collection all of its elements that are contained in the
specified collection
|
boolean |
removeIf(Predicate<? super T> filter)
"Remove all elements from the list that match the given predicate."
|
boolean |
retainAll(Collection<?> c)
Removes all of this collection's elements that are not contained in the
specified collection.
|
protected void |
save() |
T |
set(int index,
T element)
Replaces the element at the specified position in this list with the
specified element.
|
int |
size()
Returns the number of elements in this list.
|
List<T> |
subList(int fromIndex,
int toIndex)
Returns a view of the portion of this list between the specified fromIndex,
inclusive, and toIndex, exclusive
|
Object[] |
toArray()
Returns an array containing all of the elements in this list in proper
sequence (from first to last element).
|
<E> E[] |
toArray(E[] a)
Returns an array containing all of the elements in this list in proper
sequence (from first to last element).
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, get, hashCode, replaceAll, sort, spliteratorparallelStream, streamget, toListCopyprotected Object listObject
protected NBTList(NBTCompound owner, String name, NBTType type, Object list)
public String getName()
public NBTCompound getParent()
protected void save()
public boolean add(T element)
ReadWriteNBTListadd in interface ReadWriteNBTList<T>add in interface Collection<T>add in interface List<T>element - The element to be added to the list.public void add(int index,
T element)
ReadWriteNBTListpublic T set(int index, T element)
ReadWriteNBTListpublic T remove(int i)
ReadWriteNBTListpublic int size()
ReadableNBTListsize in interface ReadableNBTList<T>size in interface Collection<T>size in interface List<T>public NBTType getType()
ReadableNBTListgetType in interface ReadableNBTList<T>public boolean isEmpty()
ReadableNBTListisEmpty in interface ReadableNBTList<T>isEmpty in interface Collection<T>isEmpty in interface List<T>public void clear()
ReadWriteNBTListclear in interface ReadWriteNBTList<T>clear in interface Collection<T>clear in interface List<T>public boolean contains(Object o)
ReadableNBTListcontains in interface ReadableNBTList<T>contains in interface Collection<T>contains in interface List<T>o - The object to be searched for in the list.public int indexOf(Object o)
ReadableNBTListpublic boolean addAll(Collection<? extends T> c)
ReadWriteNBTListaddAll in interface ReadWriteNBTList<T>addAll in interface Collection<T>addAll in interface List<T>c - The collection to be added to the list.public boolean addAll(int index,
Collection<? extends T> c)
ReadWriteNBTListpublic boolean containsAll(Collection<?> c)
ReadableNBTListcontainsAll in interface ReadableNBTList<T>containsAll in interface Collection<T>containsAll in interface List<T>c - The collection to be checked for containment in this listpublic int lastIndexOf(Object o)
ReadableNBTListlastIndexOf in interface ReadableNBTList<T>lastIndexOf in interface List<T>o - The object to search for.public boolean removeAll(Collection<?> c)
ReadWriteNBTListremoveAll in interface ReadWriteNBTList<T>removeAll in interface Collection<T>removeAll in interface List<T>c - The collection to be removed from this list.public boolean retainAll(Collection<?> c)
ReadWriteNBTListretainAll in interface ReadWriteNBTList<T>retainAll in interface Collection<T>retainAll in interface List<T>c - The collection to be retained in this listpublic boolean remove(Object o)
ReadWriteNBTListremove in interface ReadWriteNBTList<T>remove in interface Collection<T>remove in interface List<T>o - The object to be removed from the list.public ListIterator<T> listIterator()
listIterator in interface List<T>public ListIterator<T> listIterator(int startIndex)
ReadWriteNBTListlistIterator in interface ReadWriteNBTList<T>listIterator in interface List<T>startIndex - The index of the first element to be returned from the list
iterator (by a call to the next method).public Object[] toArray()
ReadableNBTListtoArray in interface ReadableNBTList<T>toArray in interface Collection<T>toArray in interface List<T>public <E> E[] toArray(E[] a)
ReadableNBTListtoArray in interface ReadableNBTList<T>toArray in interface Collection<T>toArray in interface List<T>a - The array into which the elements of the list are to be stored, if
it is big enough; otherwise, a new array of the same runtime type is
allocated for this purpose.public List<T> subList(int fromIndex, int toIndex)
ReadableNBTListpublic boolean removeIf(Predicate<? super T> filter)
ReadWriteNBTListremoveIf in interface ReadWriteNBTList<T>removeIf in interface Collection<T>filter - The predicate to apply to each element to determine if it should
be removed.Copyright © 2015–2025 tr7zw. All rights reserved.