org.jgroups.util
public class List extends Object implements Externalizable, Cloneable
Field Summary | |
---|---|
protected List.Element | head |
protected Object | mutex |
protected int | size |
protected List.Element | tail |
Constructor Summary | |
---|---|
List() |
Method Summary | |
---|---|
void | add(Object obj)
Adds an object at the tail of the list. |
void | addAtHead(Object obj)
Adds an object at the head of the list. |
protected Object | clone() |
boolean | contains(Object obj) |
List | copy() |
String | dump() |
Enumeration | elements() |
Vector | getContents() |
static void | main(String[] args) |
Object | peek()
Returns element at the tail (if present), but does not remove it from list. |
Object | peekAtHead()
Returns element at the head (if present), but does not remove it from list. |
void | readExternal(ObjectInput in) |
Object | remove()
Removes an object from the tail of the list. |
void | removeAll() |
Object | removeElement(Object obj)
Removes element obj from the list, checking for equality using the equals
operator. |
Object | removeFromHead() Removes an object from the head of the list. |
int | size() |
String | toString() |
void | writeExternal(ObjectOutput out) |
obj
from the list, checking for equality using the equals
operator. Only the first duplicate object is removed. Returns the removed object.