|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.knipp.rritoolkit.KVList.SingletonIterator<E>
E
- the value typeprivate static class KVList.SingletonIterator<E>
small class repesenting a singleton iterator
Field Summary | |
---|---|
private boolean |
first
flag whether we are at the first element |
private E |
value
the value |
Constructor Summary | |
---|---|
KVList.SingletonIterator(E v)
constructor |
Method Summary | |
---|---|
boolean |
hasNext()
return whether there are more elements |
E |
next()
return the first element |
void |
remove()
remove the current element |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private E value
private boolean first
Constructor Detail |
---|
public KVList.SingletonIterator(E v)
v
- the valueMethod Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator<E>
true
if sopublic E next() throws java.util.NoSuchElementException
next
in interface java.util.Iterator<E>
java.util.NoSuchElementException
- on attempts to read past the endpublic void remove() throws java.lang.UnsupportedOperationException
remove
in interface java.util.Iterator<E>
java.lang.UnsupportedOperationException
- always
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |