org.jgroups.util

Class Stack

Implemented Interfaces:
Cloneable, Externalizable

public class Stack
extends List

LIFO stack, with better performance than java.util.Stack (based on List).

Field Summary

Fields inherited from class org.jgroups.util.List

head, mutex, size, tail

Constructor Summary

Stack()

Method Summary

Object
bottom()
List
copy()
boolean
empty()
Object
peek()
Object
pop()
void
push(Object obj)
void
readExternal(ObjectInput in)
void
writeExternal(ObjectOutput out)

Methods inherited from class org.jgroups.util.List

add, addAtHead, clone, contains, copy, dump, elements, getContents, main, peek, peekAtHead, readExternal, remove, removeAll, removeElement, removeFromHead, size, toString, writeExternal

Constructor Details

Stack

public Stack()

Method Details

bottom

public Object bottom()

copy

public List copy()
Overrides:
copy in interface List

empty

public boolean empty()

peek

public Object peek()
Overrides:
peek in interface List

pop

public Object pop()

push

public void push(Object obj)

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException
Overrides:
readExternal in interface List

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException
Overrides:
writeExternal in interface List

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.