|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.berkeley.guir.lib.collection.OrderedList
A linked list with lots of extra functionality, including:
getForwardIterator()
getReverseIterator()
swap(int, int)
moveTo(int, int)
moveToFront(int)
moveToBack(int)
This software is distributed under the Berkeley Software License.
Revisions: - GUIRLib-v1.0-1.0.0, May 09 1999, JH
Created class
- GUIRLib-v1.2-1.0.0, Jun 22 2000, JH
Touched for GUIRLib release
- GUIRLib-v1.3-1.0.0, Aug 11 2000, JH
Touched for GUIRLib release
- GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
Touched for GUIRLib release
| Constructor Summary | |
OrderedList()
Create a new, empty, ordered list. |
|
| Method Summary | |
void |
add(int index,
Object obj)
|
boolean |
add(Object obj)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(int index,
Collection c)
|
void |
addToBack(Object obj)
Same as add(), just here for symmetry. |
void |
addToFront(Object obj)
Add an item to the front. |
void |
clear()
|
Object |
clone()
Make a shallow copy. |
boolean |
contains(Object obj)
|
boolean |
containsAll(Collection c)
|
Enumeration |
elements()
|
boolean |
equals(Object obj)
|
Object |
get(int index)
|
Iterator |
getForwardIterator()
Get an iterator that goes through the list in forward order. |
Iterator |
getReverseIterator()
Get an iterator that goes through the list in reverse order. |
int |
hashCode()
|
int |
indexOf(Object obj)
|
boolean |
isEmpty()
|
Iterator |
iterator()
|
int |
lastIndexOf(Object obj)
|
ListIterator |
listIterator()
|
ListIterator |
listIterator(int index)
|
void |
moveTo(int xx,
int yy)
Move an item in the list from one position to another. |
void |
moveToBack(int xx)
Move the item at the specified position to the back of the list. |
void |
moveToFront(int xx)
Move the item at the specified position to the front of the Vector. |
Object |
remove(int index)
|
boolean |
remove(Object obj)
|
boolean |
removeAll(Collection c)
|
boolean |
retainAll(Collection c)
|
Object |
set(int index,
Object obj)
|
int |
size()
|
List |
subList(int fromIndex,
int toIndex)
|
void |
swap(int xx,
int yy)
Swap two elements in the list given positions. |
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public OrderedList()
| Method Detail |
public Iterator getForwardIterator()
public Iterator getReverseIterator()
public Enumeration elements()
public void addToFront(Object obj)
obj - is the Object to add.public void addToBack(Object obj)
obj - is the Object to add.
public void swap(int xx,
int yy)
xx - is the index of one of the items to swap. It is zero-based.yy - is the index of one of the items to swap. It is zero-based.
public void moveTo(int xx,
int yy)
xx - is the index of the item to move from. It is zero-based.yy - is the index of the position to move to. It is zero-based.public void moveToFront(int xx)
xx - is the index of the item to move to the front. It is zero-based.public void moveToBack(int xx)
xx - is the index of the item to move to the back. It is zero-based.
public void add(int index,
Object obj)
add in interface ListLinkedList.add(int, Object)public boolean add(Object obj)
add in interface ListLinkedList.add(Object)public boolean addAll(Collection c)
addAll in interface ListLinkedList.addAll(Collection)
public boolean addAll(int index,
Collection c)
addAll in interface ListLinkedList.addAll(int, Collection)public void clear()
clear in interface ListLinkedList.clear()public boolean contains(Object obj)
contains in interface ListLinkedList.contains(Object)public boolean containsAll(Collection c)
containsAll in interface ListAbstractCollection.containsAll(Collection)public boolean equals(Object obj)
equals in interface Listequals in class ObjectAbstractList.equals(Object)public Object get(int index)
get in interface ListLinkedList.get(int)public int hashCode()
hashCode in interface ListhashCode in class ObjectAbstractList.hashCode()public int indexOf(Object obj)
indexOf in interface ListLinkedList.indexOf(Object)public boolean isEmpty()
isEmpty in interface ListAbstractCollection.isEmpty()public Iterator iterator()
iterator in interface ListAbstractSequentialList.iterator()public int lastIndexOf(Object obj)
lastIndexOf in interface ListLinkedList.lastIndexOf(Object)public ListIterator listIterator()
listIterator in interface ListAbstractList.listIterator()public ListIterator listIterator(int index)
listIterator in interface ListLinkedList.listIterator(int)public Object remove(int index)
remove in interface ListLinkedList.remove(int)public boolean remove(Object obj)
remove in interface ListLinkedList.remove(Object)public boolean removeAll(Collection c)
removeAll in interface ListAbstractCollection.removeAll(Collection)public boolean retainAll(Collection c)
retainAll in interface ListAbstractCollection.retainAll(Collection)
public Object set(int index,
Object obj)
set in interface ListLinkedList.set(int, Object)public int size()
size in interface ListLinkedList.size()
public List subList(int fromIndex,
int toIndex)
subList in interface ListAbstractList.subList(int, int)public Object[] toArray()
toArray in interface ListLinkedList.toArray()public Object[] toArray(Object[] a)
toArray in interface ListLinkedList.toArray(Object[])public Object clone()
clone in class Objectpublic String toString()
toString in class Object
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||