|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hsqldb.lib.WrapperIterator
An Iterator that returns the elements of a specified array, or other iterators etc. The collection of objects returned depends on the constructor used.
Based on similar Enumerator code by boucherb@users
Constructor Summary | |
WrapperIterator()
Constructor for an empty iterator. |
|
WrapperIterator(Iterator it1,
Iterator it2)
Constructor for a chained iterator that retuns the elements of the two specified iterators. |
|
WrapperIterator(Object element)
Constructor for a singleton object iterator |
|
WrapperIterator(Object[] elements)
Constructor for all elements of the specified array. |
|
WrapperIterator(Object[] elements,
boolean notNull)
Constructor for not-null elements of specified array. |
Method Summary | |
boolean |
hasNext()
Tests if this iterator contains more elements. |
Object |
next()
Returns the next element. |
int |
nextInt()
|
long |
nextLong()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WrapperIterator()
public WrapperIterator(Object[] elements)
elements
- the array of objects to enumeratepublic WrapperIterator(Object[] elements, boolean notNull)
elements
- the array of objects to iteratepublic WrapperIterator(Object element)
element
- the single object to iteratepublic WrapperIterator(Iterator it1, Iterator it2)
Method Detail |
public boolean hasNext()
hasNext
in interface Iterator
true
if this iterator contains more elements;
false
otherwise.public Object next()
next
in interface Iterator
NoSuchElementException
- if there is no next elementpublic int nextInt()
nextInt
in interface Iterator
public long nextLong()
nextLong
in interface Iterator
public void remove()
remove
in interface Iterator
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |