Iterable<E>, Collection<E>public class CachedIteratorCollection<E> extends AbstractCollection<E>
| Constructor | Description |
|---|---|
CachedIteratorCollection() |
Default constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(E element) |
Adds a data object (element) as a Node and sets previous/next pointers accordingly
|
void |
clear() |
Clears the AbstractCollectionTest object, all pointers reset to 'null'
|
Iterator<E> |
iterator() |
Iterator: Resets and returns CachedIterator
|
int |
size() |
Return size of current LinkedListTest object
|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringequals, hashCode, parallelStream, removeIf, spliterator, streampublic boolean add(E element)
add in interface Collection<E>add in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in class AbstractCollection<E>public Iterator<E> iterator()
iterator in interface Collection<E>iterator in interface Iterable<E>iterator in class AbstractCollection<E>public int size()
size in interface Collection<E>size in class AbstractCollection<E>