|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.formaria.util.IndexedArrayList<E>
public class IndexedArrayList<E>
An extension of ArrayList that supports an 'index' value. A shared index can be used by this class. For licensing information see license.txt
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
IndexedArrayList()
Constructs an empty list with an initial capacity of ten. |
|
IndexedArrayList(java.util.Collection<? extends E> c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. |
|
IndexedArrayList(IndexedArrayList<E> list)
Constructs an empty list with an initial capacity of ten and using the same index as referenced list |
|
IndexedArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity. |
|
| Method Summary | |
|---|---|
void |
first()
Go to the first index position |
E |
getCurrentItem()
Get the 'current' item in the list |
int |
getIndex()
Get the index of the currently 'selected' object in the list |
void |
last()
Go to the last index position |
void |
next()
Go to the next index |
void |
prev()
Go to the previous index |
void |
setIndex(int idx)
Set the index of the currently 'selected' object in the list |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public IndexedArrayList()
public IndexedArrayList(int initialCapacity)
initialCapacity - the initial capacity of the list
java.lang.IllegalArgumentException - if the specified initial capacity
is negativepublic IndexedArrayList(IndexedArrayList<E> list)
public IndexedArrayList(java.util.Collection<? extends E> c)
c - the collection whose elements are to be placed into this list
java.lang.NullPointerException - if the specified collection is null| Method Detail |
|---|
public int getIndex()
public void setIndex(int idx)
idx - the new selection indexpublic void first()
public void last()
public void next()
public void prev()
public E getCurrentItem()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||