|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.util
Class TreeMap.TreeIterator

java.lang.Objectjava.util.TreeMap.TreeIterator
- All Implemented Interfaces:
- Iterator
- Enclosing class:
- TreeMap
- private final class TreeMap.TreeIterator
- extends java.lang.Object
- implements Iterator
- extends java.lang.Object
Iterate over TreeMap's entries. This implementation is parameterized to give a sequential view of keys, values, or entries.
| Field Summary | |
private int |
knownMod
The number of modifications to the backing Map that we know about. |
private TreeMap.Node |
last
The last Entry returned by a next() call. |
private TreeMap.Node |
max
The last node visible to this iterator. |
private TreeMap.Node |
next
The next entry that should be returned by next(). |
private int |
type
The type of this Iterator: AbstractMap.KEYS 55 , AbstractMap.VALUES 55 ,
or AbstractMap.ENTRIES 55 . |
| Constructor Summary | |
(package private) |
TreeMap.TreeIterator(int type)
Construct a new TreeIterator with the supplied type. |
(package private) |
TreeMap.TreeIterator(int type,
TreeMap.Node first,
TreeMap.Node max)
Construct a new TreeIterator with the supplied type. |
| Method Summary | |
boolean |
hasNext()
Returns true if the Iterator has more elements. |
java.lang.Object |
next()
Returns the next element in the Iterator's sequential view. |
void |
remove()
Removes from the backing TreeMap the last element which was fetched with the next() method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
type
private final int type
- The type of this Iterator:
AbstractMap.KEYS55 ,AbstractMap.VALUES55 , orAbstractMap.ENTRIES55 .
knownMod
private int knownMod
- The number of modifications to the backing Map that we know about.
last
private TreeMap.Node last
- The last Entry returned by a next() call.
next
private TreeMap.Node next
- The next entry that should be returned by next().
max
private final TreeMap.Node max
- The last node visible to this iterator. This is used when iterating
on a SubMap.
| Constructor Detail |
TreeMap.TreeIterator
TreeMap.TreeIterator(int type)
- Construct a new TreeIterator with the supplied type.
TreeMap.TreeIterator
TreeMap.TreeIterator(int type,
TreeMap.Node first,
TreeMap.Node max)
- Construct a new TreeIterator with the supplied type. Iteration will
be from "first" (inclusive) to "max" (exclusive).
| Method Detail |
hasNext
public boolean hasNext()
next
public java.lang.Object next()
remove
public void remove()
- Removes from the backing TreeMap the last element which was fetched
with the
next()method.
|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java.util.TreeMap.TreeIterator