org.jgroups.util
Class BoundedList
- Cloneable, Externalizable
A bounded subclass of List, oldest elements are removed once max capacity is exceeded
$Id: BoundedList.java,v 1.2 2004/07/26 15:23:26 belaban Exp $
void | add(Object obj)- Adds an element at the tail.
|
void | addAtHead(Object obj)- Adds an object to the head, removes an element from the tail if capacity has been exceeded
|
add, addAtHead, clone, contains, copy, dump, elements, getContents, main, peek, peekAtHead, readExternal, remove, removeAll, removeElement, removeFromHead, size, toString, writeExternal |
BoundedList
public BoundedList()
BoundedList
public BoundedList(int size)
add
public void add(Object obj)
Adds an element at the tail. Removes an object from the head if capacity is exceeded
- add in interface List
obj - The object to be added
addAtHead
public void addAtHead(Object obj)
Adds an object to the head, removes an element from the tail if capacity has been exceeded
- addAtHead in interface List
obj - The object to be added
Copyright B) 1998-2005 Bela Ban. All Rights Reserved.