public abstract class NodeList<T extends Node> extends AbstractList<T> implements NodeIterable<T>, RandomAccess
Modifier and Type | Field and Description |
---|---|
protected static Node[] |
EMPTY_NODE_ARRAY |
protected int |
initialSize |
protected Node[] |
nodes |
protected Node |
self |
private int |
size |
modCount
Modifier | Constructor and Description |
---|---|
protected |
NodeList(Node self) |
protected |
NodeList(Node self,
Collection<? extends NodeInterface> elements) |
protected |
NodeList(Node self,
int initialSize) |
protected |
NodeList(Node self,
List<? extends T> elements) |
protected |
NodeList(Node self,
T[] elements) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Node node) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(T[] c) |
private boolean |
assertInRange(int index) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
contains(T other) |
boolean |
containsAll(Collection<?> c) |
(package private) void |
copy(NodeList<? extends Node> other) |
int |
count() |
boolean |
equals(NodeList<T> other) |
T |
first() |
T |
get(int index) |
abstract Edges.Type |
getEdgesType() |
protected void |
incModCount() |
int |
indexOf(Object node) |
void |
initialize(int index,
Node node) |
boolean |
isEmpty() |
boolean |
isList() |
boolean |
isNotEmpty() |
Iterator<T> |
iterator() |
T |
last() |
T |
remove(int index) |
boolean |
remove(Object node) |
protected void |
replace(T node,
T other) |
(package private) boolean |
replaceFirst(Node node,
Node other) |
T |
set(int index,
Node node) |
void |
setAll(NodeList<T> values) |
int |
size() |
List<T> |
snapshot() |
void |
snapshotTo(Collection<? super T> to) |
Object[] |
toArray() |
<A> A[] |
toArray(A[] a) |
String |
toString() |
protected abstract void |
update(T oldNode,
T newNode) |
add, addAll, equals, hashCode, lastIndexOf, listIterator, listIterator, removeRange, subList
removeAll, retainAll
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
distinct, filter, filter, filterInterface, nonNull
forEach, spliterator
removeAll, replaceAll, retainAll, sort, spliterator
parallelStream, removeIf, stream
protected static final Node[] EMPTY_NODE_ARRAY
private int size
protected final int initialSize
protected NodeList(Node self, Collection<? extends NodeInterface> elements)
public boolean isList()
public abstract Edges.Type getEdgesType()
public final int size()
public final boolean isEmpty()
public boolean isNotEmpty()
isNotEmpty
in interface NodeIterable<T extends Node>
public int count()
count
in interface NodeIterable<T extends Node>
protected final void incModCount()
private boolean assertInRange(int index)
public void initialize(int index, Node node)
public void clear()
boolean replaceFirst(Node node, Node other)
public boolean contains(T other)
contains
in interface NodeIterable<T extends Node>
public void snapshotTo(Collection<? super T> to)
snapshotTo
in interface NodeIterable<T extends Node>
public <A> A[] toArray(A[] a)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T extends Node>
containsAll
in interface List<T extends Node>
containsAll
in class AbstractCollection<T extends Node>
public boolean addAll(Collection<? extends T> c)