FileDocCategorySizeDatePackage
StackImpl.javaAPI DocJBoss 4.2.11803Fri Jul 13 21:02:22 BST 2007test.dbc.stack

StackImpl

public class StackImpl extends Object implements Stack
author
Kabir Khan
version
$Revision: 57186 $

Fields Summary
private final LinkedList
elements
Constructors Summary
Methods Summary
public booleanisEmpty()

      return elements.size() == 0;
   
public java.lang.Objectpop()

      //For this we need $old functionality
      //* @@org.jboss.aspects.dbc.PostCond ({"$tgt.top() == $rtn"})
      final Object popped = top();
      elements.removeLast();
      return popped;
   
public voidpush(java.lang.Object o)


      
   
      elements.add(o);
   
public java.lang.Objecttop()

      if (elements.size() == 0)
      {
         return null;
      }
      return elements.getLast();