livespace.services
Class EntityStack

java.lang.Object
  extended by dsto.dfc.databeans.AbstractDataObject
      extended by dsto.dfc.databeans.SimpleDataObject
          extended by dsto.dfc.databeans.FancyDataObject
              extended by livespace.services.EntityList
                  extended by livespace.services.EntityStack
All Implemented Interfaces:
IDataObject, IDataObjectChildListener, Cloneable

public class EntityStack
extends EntityList

A last-in-first-out stack of entities. This extends EntityList with operations that allow the list to be treated as a stack.

Author:
Steven Johnson Created on 17/05/2006

Nested Class Summary
 
Nested classes/interfaces inherited from class livespace.services.EntityList
EntityList.ListEntity
 
Field Summary
 
Fields inherited from class livespace.services.EntityList
endIndex, entities, startIndex
 
Fields inherited from class dsto.dfc.databeans.AbstractDataObject
listeners
 
Fields inherited from interface dsto.dfc.databeans.IDataObject
OVERRIDE, PERSISTENT, PERSISTENT_OVERRIDE, TRANSIENT, TRANSIENT_OVERRIDE
 
Constructor Summary
EntityStack()
           
 
Method Summary
 Entity peek()
          Finds the top entity on the stack without removing it from the stack.
 Entity pop()
          Removes and returns the Entity at the top of the stack.
 void push(Entity e)
          Pushes an Entity on to the top of stack.
 
Methods inherited from class livespace.services.EntityList
add, add, clear, get, isEmpty, iterator, remove, remove, remove, size, snapshot
 
Methods inherited from class dsto.dfc.databeans.FancyDataObject
childPropertyChanged, getValue, isTransient, propertyIterator, setValue, shallowClone
 
Methods inherited from class dsto.dfc.databeans.SimpleDataObject
getFieldNames, getTypeInfo, setValue
 
Methods inherited from class dsto.dfc.databeans.AbstractDataObject
addFirstPropertyListener, addPropertyListener, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, getBeanValue, getBooleanValue, getBooleanValue, getCharValue, getCharValue, getDoubleValue, getDoubleValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getObjectValue, getPropertyListeners, getShortValue, getStringValue, registerValue, removePropertyListener, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, unregisterValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityStack

public EntityStack()
Method Detail

peek

public Entity peek()
            throws IllegalStateException
Finds the top entity on the stack without removing it from the stack.

Returns:
the Entity at the top of the stack.
Throws:
IllegalStateException - if the stack is empty

pop

public Entity pop()
           throws IllegalStateException
Removes and returns the Entity at the top of the stack.

Returns:
the Entity at the top of the stack
Throws:
IllegalStateException - if the stack is empty

push

public void push(Entity e)
Pushes an Entity on to the top of stack.

Parameters:
e - the Entity to put at the top of the stack.


Copyright © 2008 Commonwealth of Australia