|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.AbstractSequentialList java.util.LinkedList wyvern.util.FixedSizeList
A linked list that will store no more than N elements. When it reaches size N, it will remove the last element each time a new element is added to the front.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
FixedSizeList(int size)
Constructs a new FixedSizeList |
Method Summary | |
boolean |
add(java.lang.Object obj)
Adds something to the front of the list. |
void |
addFirst(java.lang.Object obj)
Adds an item to the front of the list. |
java.lang.String |
toString()
Prints out the list, in order. |
Methods inherited from class java.util.LinkedList |
add, addAll, addAll, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
Methods inherited from class java.util.AbstractSequentialList |
iterator |
Methods inherited from class java.util.AbstractList |
equals, hashCode, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, isEmpty, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
public FixedSizeList(int size)
size
- the maximum length you want the list to growMethod Detail |
public void addFirst(java.lang.Object obj)
public boolean add(java.lang.Object obj)
obj
- the object to put at the front
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |