| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final E[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ArrayIterator(final E[]
the elements to iterate over elements, final boolean true to iterate in descending order, false otherwiseConstruct a new instance. |
| public | ArrayIterator(final E[]
the elements to iterate over elements, final int the starting index (must be within the bounds of startIdx)elements)Construct a new instance. |
| public | ArrayIterator(final E[]
the elements to iterate over elements, final boolean true to iterate in descending order, false otherwisethe starting index (must be within the bounds of startIdx)elements)Construct a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if there are more elements, false otherwiseImplements java. |
| public boolean | Returns: true if there are more elements, false otherwiseImplements java. |
| public E | Returns: the next elementImplements java. |
| public int | Returns: the next indexImplements java. |
| public E | Returns: the next elementImplements java. |
| public int | Returns: the next indexImplements java. |
| public void | remove()
Overrides default java. Implements java. |
| public void |
| descending | back to summary |
|---|---|
| private final boolean descending | |
| elements | back to summary |
|---|---|
| private final E[] elements | |
| idx | back to summary |
|---|---|
| private int idx | |
| ArrayIterator | back to summary |
|---|---|
| public ArrayIterator(final E[] elements) Construct a new instance.
| |
| ArrayIterator | back to summary |
|---|---|
| public ArrayIterator(final E[] elements, final boolean descending) Construct a new instance.
| |
| ArrayIterator | back to summary |
|---|---|
| public ArrayIterator(final E[] elements, final int startIdx) Construct a new instance.
| |
| ArrayIterator | back to summary |
|---|---|
| public ArrayIterator(final E[] elements, final boolean descending, final int startIdx) Construct a new instance.
| |
| add | back to summary |
|---|---|
| public void add(final E e) Implements java. Unsupported.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Determine if there are more elements to iterate over in the direction of this iterator.
| |
| hasPrevious | back to summary |
|---|---|
| public boolean hasPrevious() Implements java. Determine if there are more elements to iterate over in the reverse direction of this iterator.
| |
| next | back to summary |
|---|---|
| public E next() Implements java. Get the next element in the direction of this iterator.
| |
| nextIndex | back to summary |
|---|---|
| public int nextIndex() Implements java. Get the next index in the direction of this iterator.
| |
| previous | back to summary |
|---|---|
| public E previous() Implements java. Get the next element in the reverse direction of this iterator.
| |
| previousIndex | back to summary |
|---|---|
| public int previousIndex() Implements java. Get the next index in the reverse direction of this iterator.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Implements java. Unsupported. | |
| set | back to summary |
|---|---|
| public void set(final E e) Implements java. Unsupported.
| |