|
||||||||||
| 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.AbstractSequentialList<E>
java.util.LinkedList<T>
net.spy.util.LimitedList<T>
public class LimitedList<T>
A LinkedList with a maximum capacity.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
LimitedList(int l)
Get an instance of Queue. |
|
| Method Summary | |
|---|---|
void |
add(int index,
T o)
Override add to enforce the limit. |
boolean |
add(T o)
Override add to enforce the limit. |
boolean |
addAll(java.util.Collection<? extends T> c)
Override addAll to enforce the limit. |
boolean |
addAll(int index,
java.util.Collection<? extends T> c)
Override addAll to enforce the limit. |
void |
addFirst(T o)
Override addFirst to enforce the limit. |
void |
addLast(T o)
Override addLast to enforce the limit. |
int |
getLimit()
Get the maximum number of elements that may be stored in this list. |
void |
setLimit(int to)
Dynamically reset the limit. |
| Methods inherited from class java.util.LinkedList |
|---|
clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, 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, 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, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public LimitedList(int l)
| Method Detail |
|---|
public void setLimit(int to)
to - the new limit valuepublic int getLimit()
public void add(int index,
T o)
add in interface java.util.List<T>add in class java.util.LinkedList<T>index - index at which to addo - object to add
java.lang.IndexOutOfBoundsException - if the limit is exceeded (or
the parent size thinks it's too big).public boolean add(T o)
add in interface java.util.Collection<T>add in interface java.util.List<T>add in class java.util.LinkedList<T>o - object to add
java.lang.IndexOutOfBoundsException - if the limit is exceeded (or
the parent size thinks it's too big).public void addFirst(T o)
addFirst in class java.util.LinkedList<T>o - object to add
java.lang.IndexOutOfBoundsException - if the limit is exceeded (or
the parent size thinks it's too big).public void addLast(T o)
addLast in class java.util.LinkedList<T>o - object to add
java.lang.IndexOutOfBoundsException - if the limit is exceeded (or
the parent size thinks it's too big).
public boolean addAll(int index,
java.util.Collection<? extends T> c)
addAll in interface java.util.List<T>addAll in class java.util.LinkedList<T>index - the index at which to add the collectionc - Collectoin of objects to add
java.lang.IndexOutOfBoundsException - if the limit is exceeded (or
the parent size thinks it's too big).public boolean addAll(java.util.Collection<? extends T> c)
addAll in interface java.util.Collection<T>addAll in interface java.util.List<T>addAll in class java.util.LinkedList<T>c - Collectoin of objects to add
java.lang.IndexOutOfBoundsException - if the limit is exceeded (or
the parent size thinks it's too big).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||