public class PairList.Iterator extends Object
PairList
, without having to create new object as wrapper for
each pair.
Protocol is somewhat similar to the protocol of Iterator
only here next() doesn't return the next object, it just moves along in
the collection. Values related to current pair can be retrieved by calling
getCurrentFirst() and getCurrentSecond() methods.
Not thread-safe.Constructor and Description |
---|
Iterator() |
Modifier and Type | Method and Description |
---|---|
U |
getCurrentFirst()
Get first element of the current pair of the iteration.
|
V |
getCurrentSecond()
Get second element of the current pair of the iteration.
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
void |
next()
Moves to the next element in the iteration.
|
public boolean hasNext()
public void next()
public U getCurrentFirst()
public V getCurrentSecond()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.