Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.services.util

Class Pile

com.gentleware.services.util.Pile

public class Pile


Pile is an implementation of a stack.

Unlike java.util.Stack it only offers operations specific to a stack (plus methods inherited from the Collection interface), because it takes the clean approach of delegating to a list instead of inheriting from Vector.

This class is unsynchronized (also unlike Stack which uses the pre-Collections norm).

Created: 07.02.2003 19:07:38

Authors:
Stephen Kelvin


 Attribute Summary
private LinkedList  _list
 
arrow_up
 

 Constructor Summary
public   Pile()
Creates a new pile (i.e. 
arrow_up
 

 Method Summary
public boolean   add(Object o)
 
public boolean   addAll(Collection c)
 
public void   clear()
 
public boolean   contains(Object o)
 
public boolean   containsAll(Collection c)
 
public boolean   isEmpty()
 
public Iterator   iterator()
 
public Object   peek()
Retrieves the element at the top of the pile without removing it  
public Object   pop()
Removes and returns the element at the top of the pile  
public void   push(Object element)
 
public boolean   remove(Object o)
 
public boolean   removeAll(Collection c)
 
public void   removeBottom()
Removes the element at the bottom of the stack. 
public boolean   retainAll(Collection c)
 
public int   size()
 
public Object[]   toArray()
 
public Object[]   toArray(Object[] a)
 
arrow_up
 

Tagged Values
static false
 

 Attribute Detail

_list

private LinkedList _list

arrow_up
 Constructor Detail

Pile

public Pile Pile()


Creates a new pile (i.e. stack)  
Returns:
arrow_up
 Method Detail

add

public boolean add(Object o)

Parameters:
o -
Returns:
arrow_up


addAll

public boolean addAll(Collection c)

Parameters:
c -
Returns:
arrow_up


clear

public void clear()

arrow_up


contains

public boolean contains(Object o)

Parameters:
o -
Returns:
arrow_up


containsAll

public boolean containsAll(Collection c)

Parameters:
c -
Returns:
arrow_up


isEmpty

public boolean isEmpty()

Returns:
arrow_up


iterator

public Iterator iterator()

Returns:
arrow_up


peek

public Object peek()


Retrieves the element at the top of the pile without removing it  
Returns:
the element that was at the top of the pile
arrow_up


pop

public Object pop()


Removes and returns the element at the top of the pile  
Returns:
the element that was at the top of the pile
arrow_up


push

public void push(Object element)

Parameters:
element -
arrow_up


remove

public boolean remove(Object o)

Parameters:
o -
Returns:
arrow_up


removeAll

public boolean removeAll(Collection c)

Parameters:
c -
Returns:
arrow_up


removeBottom

public void removeBottom()


Removes the element at the bottom of the stack.  
arrow_up


retainAll

public boolean retainAll(Collection c)

Parameters:
c -
Returns:
arrow_up


size

public int size()

Returns:
arrow_up


toArray

public Object[] toArray()

Returns:
arrow_up


toArray

public Object[] toArray(Object[] a)

Parameters:
a -
Returns:
arrow_up
Created  2004 - 10 - 21

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.