public class CachedIteratorCollection<E> extends AbstractCollection<E>
Constructor and Description |
---|
CachedIteratorCollection()
Default constructor
|
Modifier and Type | Method and 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public 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 Iterable<E>
iterator
in interface Collection<E>
iterator
in class AbstractCollection<E>
public int size()
size
in interface Collection<E>
size
in class AbstractCollection<E>