static class TreeBidiMap.ViewIterator extends java.lang.Object implements OrderedIterator
| Modifier and Type | Field and Description |
|---|---|
protected int |
dataType
Whether to return KEY, VALUE, MAPENTRY or INVERSEMAPENTRY data.
|
private int |
expectedModifications
The modification count.
|
protected TreeBidiMap.Node |
lastReturnedNode
The last node returned by the iterator.
|
protected TreeBidiMap |
main
The parent map.
|
protected TreeBidiMap.Node |
nextNode
The next node to be returned by the iterator.
|
protected int |
orderType
Whether to return KEY or VALUE order.
|
protected TreeBidiMap.Node |
previousNode
The previous node in the sequence returned by the iterator.
|
| Constructor and Description |
|---|
ViewIterator(TreeBidiMap main,
int orderType,
int dataType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
doGetData()
Gets the data value for the lastReturnedNode field.
|
boolean |
hasNext() |
boolean |
hasPrevious()
Checks to see if there is a previous element that can be iterated to.
|
java.lang.Object |
next() |
java.lang.Object |
previous()
Gets the previous element from the collection.
|
void |
remove() |
protected final TreeBidiMap main
protected final int orderType
protected final int dataType
protected TreeBidiMap.Node lastReturnedNode
protected TreeBidiMap.Node nextNode
protected TreeBidiMap.Node previousNode
private int expectedModifications
ViewIterator(TreeBidiMap main, int orderType, int dataType)
main - the main maporderType - the KEY or VALUE int for the orderdataType - the KEY, VALUE, MAPENTRY or INVERSEMAPENTRY intpublic final boolean hasNext()
hasNext in interface java.util.Iteratorpublic final java.lang.Object next()
next in interface java.util.Iteratorpublic boolean hasPrevious()
OrderedIteratorhasPrevious in interface OrderedIteratortrue if the iterator has a previous elementpublic java.lang.Object previous()
OrderedIteratorprevious in interface OrderedIteratorprotected java.lang.Object doGetData()
public final void remove()
remove in interface java.util.Iterator