JavaGroups
Class Stack
java.lang.Object
|
+--JavaGroups.List
|
+--JavaGroups.Stack
- public class Stack
- extends List
- implements java.io.Externalizable
LIFO stack, with better performance than java.util.Stack (based on Vector).
- See Also:
- Serialized Form
|
Constructor Summary |
Stack()
|
|
Method Summary |
List |
Copy()
|
boolean |
Empty()
|
static void |
main(java.lang.String[] args)
|
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 JavaGroups.List |
Add,
AddAtHead,
Contains,
Dump,
Elements,
GetContents,
PeekAtHead,
Remove,
RemoveAll,
RemoveElement,
RemoveFromHead,
Size,
toString |
| Methods inherited from class java.lang.Object |
equals,
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
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
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
main
public static void main(java.lang.String[] args)