| Constructor and Description |
|---|
ReadOnlyIterator(DataStructure dataStructure)
Constructor, wraps the iterator of the given data structure.
|
ReadOnlyIterator(Iterator it)
Constructor, wraps iterator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the iteration.
|
void |
remove()
Operation is unsupported by ReadOnlyIterator, throws UnsupportedOperationException.
|
public ReadOnlyIterator(DataStructure dataStructure)
dataStructure - the data structure to wrappublic ReadOnlyIterator(Iterator it)
it - iterator to wrap