Package net.minecraft.util
Class NonNullList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- net.minecraft.util.NonNullList<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.List<E>
public class NonNullList<E> extends java.util.AbstractList<E>
-
-
Field Summary
Fields Modifier and Type Field Description private E
defaultValue
private java.util.List<E>
list
-
Constructor Summary
Constructors Modifier Constructor Description protected
NonNullList()
protected
NonNullList(java.util.List<E> p_i47327_1_, E p_i47327_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int p_add_1_, E p_add_2_)
void
clear()
static <E> NonNullList<E>
create()
E
get(int p_get_1_)
static <E> NonNullList<E>
of(E p_193580_0_, E... p_193580_1_)
E
remove(int p_remove_1_)
E
set(int p_set_1_, E p_set_2_)
int
size()
static <E> NonNullList<E>
withSize(int p_191197_0_, E p_191197_1_)
-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Method Detail
-
create
public static <E> NonNullList<E> create()
-
withSize
public static <E> NonNullList<E> withSize(int p_191197_0_, E p_191197_1_)
-
of
@SafeVarargs public static <E> NonNullList<E> of(E p_193580_0_, E... p_193580_1_)
-
get
@Nonnull public E get(int p_get_1_)
-
add
public void add(int p_add_1_, E p_add_2_)
-
remove
public E remove(int p_remove_1_)
-
size
public int size()
-
-