- java.lang.Object
-
- org.hsqldb.lib.WrapperIterator<E>
-
- All Implemented Interfaces:
Iterator<E>
public class WrapperIterator<E> extends java.lang.Object implements Iterator<E>
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 campbell-burnet@users
- Since:
- HSQLDB 1.7.2
- Author:
- fred@users
-
-
Constructor Summary
Constructors Constructor Description WrapperIterator()
Constructor for an empty iterator.WrapperIterator(java.lang.Object element)
Constructor for a singleton object iteratorWrapperIterator(java.lang.Object[] elements)
Constructor for all elements of the specified array.WrapperIterator(java.lang.Object[] elements, boolean notNull)
Constructor for not-null elements of specified array.WrapperIterator(Iterator<E> it1, Iterator<E> it2)
Constructor for a chained iterator that returns the elements of the two specified iterators.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Tests if this iterator contains more elements.E
next()
Returns the next element.int
nextInt()
long
nextLong()
void
remove()
-
-
-
Constructor Detail
-
WrapperIterator
public WrapperIterator()
Constructor for an empty iterator.
-
WrapperIterator
public WrapperIterator(java.lang.Object[] elements)
Constructor for all elements of the specified array.- Parameters:
elements
- the array of objects to enumerate
-
WrapperIterator
public WrapperIterator(java.lang.Object[] elements, boolean notNull)
Constructor for not-null elements of specified array.- Parameters:
elements
- the array of objects to iteratenotNull
- boolean
-
WrapperIterator
public WrapperIterator(java.lang.Object element)
Constructor for a singleton object iterator- Parameters:
element
- the single object to iterate
-
-
Method Detail
-
hasNext
public boolean hasNext()
Tests if this iterator contains more elements.
-
next
public E next()
Returns the next element.
-
-