sleep.engine.types
Class ArrayContainer

java.lang.Object
  extended by sleep.engine.types.ArrayContainer
All Implemented Interfaces:
java.io.Serializable, ScalarArray
Direct Known Subclasses:
ArgumentArray

public class ArrayContainer
extends java.lang.Object
implements ScalarArray

See Also:
Serialized Form

Field Summary
protected  java.util.Stack values
           
 
Constructor Summary
ArrayContainer()
           
ArrayContainer(java.util.Collection initialValues)
          initial values must be a collection of Scalar's
 
Method Summary
 Scalar add(Scalar value, int index)
           
 Scalar getAt(int index)
           
 Scalar pop()
           
 Scalar push(Scalar value)
           
 Scalar remove(int index)
           
 void remove(Scalar key)
           
 java.util.Iterator scalarIterator()
           
 int size()
           
 void sort(java.util.Comparator compare)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

values

protected java.util.Stack values
Constructor Detail

ArrayContainer

public ArrayContainer()

ArrayContainer

public ArrayContainer(java.util.Collection initialValues)
initial values must be a collection of Scalar's

Method Detail

pop

public Scalar pop()
Specified by:
pop in interface ScalarArray

push

public Scalar push(Scalar value)
Specified by:
push in interface ScalarArray

size

public int size()
Specified by:
size in interface ScalarArray

sort

public void sort(java.util.Comparator compare)
Specified by:
sort in interface ScalarArray

getAt

public Scalar getAt(int index)
Specified by:
getAt in interface ScalarArray

remove

public void remove(Scalar key)
Specified by:
remove in interface ScalarArray

remove

public Scalar remove(int index)
Specified by:
remove in interface ScalarArray

scalarIterator

public java.util.Iterator scalarIterator()
Specified by:
scalarIterator in interface ScalarArray

add

public Scalar add(Scalar value,
                  int index)
Specified by:
add in interface ScalarArray

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object