Based on similar Enumerator code by campbell-burnet@users
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Object[] | |
| private static final Object[] | |
| private int | |
| private Iterator | |
| private Iterator | |
| private boolean | notNull
return only not null elements |
| Access | Constructor and Description |
|---|---|
| public | |
| public | WrapperIterator(Object[]
the array of objects to enumerate elements)Constructor for all elements of the specified array. |
| public | WrapperIterator(Object[]
the array of objects to iterate elements, boolean boolean notNull)Constructor for not-null elements of specified array. |
| public | WrapperIterator(Object
the single object to iterate element)Constructor for a singleton object iterator |
| public | WrapperIterator(Iterator<E>
Iterator it1, Iterator<E> Iterator it2)Constructor for a chained iterator that returns the elements of the two specified iterators. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this iterator contains more elements;
false otherwise.Implements org. Tests if this iterator contains more elements. |
| public E |
| chained | back to summary |
|---|---|
| private boolean chained | |
| elements | back to summary |
|---|---|
| private Object[] elements | |
| emptyelements | back to summary |
|---|---|
| private static final Object[] emptyelements | |
| i | back to summary |
|---|---|
| private int i | |
| it1 | back to summary |
|---|---|
| private Iterator<E> it1 | |
| it2 | back to summary |
|---|---|
| private Iterator<E> it2 | |
| notNull | back to summary |
|---|---|
| private boolean notNull return only not null elements | |
| WrapperIterator | back to summary |
|---|---|
| public WrapperIterator() Constructor for an empty iterator. | |
| WrapperIterator | back to summary |
|---|---|
| public WrapperIterator(Object[] elements) Constructor for all elements of the specified array.
| |
| WrapperIterator | back to summary |
|---|---|
| public WrapperIterator(Object[] elements, boolean notNull) Constructor for not-null elements of specified array.
| |
| WrapperIterator | back to summary |
|---|---|
| public WrapperIterator(Object element) Constructor for a singleton object iterator
| |
| WrapperIterator | back to summary |
|---|---|
| public WrapperIterator(Iterator<E> it1, Iterator<E> it2) Constructor for a chained iterator that returns the elements of the two specified iterators. | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements org. Tests if this iterator contains more elements.
| |
| next | back to summary |
|---|---|
| public E next() Implements org. Returns the next element.
| |