|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.evanmclean.evlib.util.ArrayListIterator<T>
T - public class ArrayListIterator<T>
A (list) iterator over an array of any objects.
| Constructor Summary | |
|---|---|
ArrayListIterator(T... arr)
|
|
ArrayListIterator(T[] arr,
int start_index,
int end_index)
|
|
ArrayListIterator(T[] arr,
int start_index,
int end_index,
int initial_index)
|
|
| Method Summary | ||
|---|---|---|
void |
add(T obj)
Always throws UnsupportedOperationException. |
|
static
|
create(T... arr)
|
|
static
|
create(T[] arr,
int start_index,
int end_index)
|
|
static
|
create(T[] arr,
int start_index,
int end_index,
int initial_index)
|
|
boolean |
hasNext()
|
|
boolean |
hasPrevious()
|
|
T |
next()
|
|
int |
nextIndex()
|
|
T |
previous()
|
|
int |
previousIndex()
|
|
void |
remove()
Always throws UnsupportedOperationException. |
|
void |
set(T obj)
Replaces the last element in the array returned by next or
previous with the specified element. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayListIterator(T... arr)
public ArrayListIterator(T[] arr,
int start_index,
int end_index)
public ArrayListIterator(T[] arr,
int start_index,
int end_index,
int initial_index)
| Method Detail |
|---|
public static <T> ArrayListIterator<T> create(T... arr)
public static <T> ArrayListIterator<T> create(T[] arr,
int start_index,
int end_index)
public static <T> ArrayListIterator<T> create(T[] arr,
int start_index,
int end_index,
int initial_index)
public void add(T obj)
add in interface ListIterator<T>obj -
UnsupportedOperationExceptionpublic boolean hasNext()
hasNext in interface Iterator<T>hasNext in interface ListIterator<T>public boolean hasPrevious()
hasPrevious in interface ListIterator<T>public T next()
next in interface Iterator<T>next in interface ListIterator<T>public int nextIndex()
nextIndex in interface ListIterator<T>public T previous()
previous in interface ListIterator<T>public int previousIndex()
previousIndex in interface ListIterator<T>public void remove()
remove in interface Iterator<T>remove in interface ListIterator<T>UnsupportedOperationExceptionpublic void set(T obj)
next or
previous with the specified element. If
set in interface ListIterator<T>obj - The object (may be null) to replace the corresponding
entry in the array.
IllegalStateException - if neither next() or previous() have been called.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||