public static class Node.NodeCollection<I> extends AbstractCollection<Node<I>>
Constructor and Description |
---|
NodeCollection(Node<I> first,
Class<?> type) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty()
Override to avoid calling size().
|
Iterator<Node<I>> |
iterator() |
int |
size()
WARNING: O(n) operation: will traverse the whole collection.
|
Node<I>[] |
toArray()
Override to avoid calling size(), which would iterate the whole list just for that.
|
<Y> Y[] |
toArray(Y[] a) |
add, addAll, clear, contains, containsAll, remove, removeAll, retainAll, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public boolean isEmpty()
isEmpty
in interface Collection<Node<I>>
isEmpty
in class AbstractCollection<Node<I>>
public int size()
size
in interface Collection<Node<I>>
size
in class AbstractCollection<Node<I>>
public Node<I>[] toArray()
toArray
in interface Collection<Node<I>>
toArray
in class AbstractCollection<Node<I>>
public <Y> Y[] toArray(Y[] a)
toArray
in interface Collection<Node<I>>
toArray
in class AbstractCollection<Node<I>>
Copyright © 2015–2021 Fiji. All rights reserved.