org.jgroups.util
Class Stack
java.lang.Object
org.jgroups.util.List
org.jgroups.util.Stack
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Externalizable, java.io.Serializable
- public class Stack
- extends List
LIFO stack, with better performance than java.util.Stack (based on List).
- See Also:
- Serialized Form
Constructor Summary |
Stack()
|
Method Summary |
java.lang.Object |
bottom()
|
List |
copy()
|
boolean |
empty()
|
java.lang.Object |
peek()
Returns element at the tail (if present), but does not remove it from list. |
java.lang.Object |
pop()
|
void |
push(java.lang.Object obj)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class org.jgroups.util.List |
add, addAtHead, clone, contains, dump, elements, getContents, main, peekAtHead, remove, removeAll, removeElement, removeFromHead, size, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Stack
public Stack()
push
public void push(java.lang.Object obj)
pop
public java.lang.Object pop()
peek
public java.lang.Object peek()
- Description copied from class:
List
- Returns element at the tail (if present), but does not remove it from list.
- Overrides:
peek
in class List
bottom
public java.lang.Object bottom()
empty
public boolean empty()
copy
public List copy()
- Overrides:
copy
in class List
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Overrides:
writeExternal
in class List
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Overrides:
readExternal
in class List
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
Copyright ? 2001,2002 www.jgroups.com . All Rights Reserved.