|
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 List
LinkedList.add(int, Object)
public boolean add(Object obj)
add
in interface List
LinkedList.add(Object)
public boolean addAll(Collection c)
addAll
in interface List
LinkedList.addAll(Collection)
public boolean addAll(int index, Collection c)
addAll
in interface List
LinkedList.addAll(int, Collection)
public void clear()
clear
in interface List
LinkedList.clear()
public boolean contains(Object obj)
contains
in interface List
LinkedList.contains(Object)
public boolean containsAll(Collection c)
containsAll
in interface List
AbstractCollection.containsAll(Collection)
public boolean equals(Object obj)
equals
in interface List
equals
in class Object
AbstractList.equals(Object)
public Object get(int index)
get
in interface List
LinkedList.get(int)
public int hashCode()
hashCode
in interface List
hashCode
in class Object
AbstractList.hashCode()
public int indexOf(Object obj)
indexOf
in interface List
LinkedList.indexOf(Object)
public boolean isEmpty()
isEmpty
in interface List
AbstractCollection.isEmpty()
public Iterator iterator()
iterator
in interface List
AbstractSequentialList.iterator()
public int lastIndexOf(Object obj)
lastIndexOf
in interface List
LinkedList.lastIndexOf(Object)
public ListIterator listIterator()
listIterator
in interface List
AbstractList.listIterator()
public ListIterator listIterator(int index)
listIterator
in interface List
LinkedList.listIterator(int)
public Object remove(int index)
remove
in interface List
LinkedList.remove(int)
public boolean remove(Object obj)
remove
in interface List
LinkedList.remove(Object)
public boolean removeAll(Collection c)
removeAll
in interface List
AbstractCollection.removeAll(Collection)
public boolean retainAll(Collection c)
retainAll
in interface List
AbstractCollection.retainAll(Collection)
public Object set(int index, Object obj)
set
in interface List
LinkedList.set(int, Object)
public int size()
size
in interface List
LinkedList.size()
public List subList(int fromIndex, int toIndex)
subList
in interface List
AbstractList.subList(int, int)
public Object[] toArray()
toArray
in interface List
LinkedList.toArray()
public Object[] toArray(Object[] a)
toArray
in interface List
LinkedList.toArray(Object[])
public Object clone()
clone
in class Object
public String toString()
toString
in class Object
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |