|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsleep.engine.types.ListContainer
public class ListContainer
A linked list backing for Sleep Arrays. Most array ops are better off with this type of backing
Field Summary | |
---|---|
protected List |
values
|
Constructor Summary | |
---|---|
ListContainer()
|
|
ListContainer(Collection initialValues)
initial values must be a collection of Scalar's |
|
ListContainer(List list)
|
Method Summary | |
---|---|
Scalar |
add(Scalar value,
int index)
add an element to the array at the specified index |
Scalar |
getAt(int index)
get an element at the specified index |
Scalar |
pop()
remove the topmost element from the array |
Scalar |
push(Scalar value)
add an element onto the end of the array |
Scalar |
remove(int index)
remove an element at the specified index |
void |
remove(Scalar key)
remove all elements with the same identity as the specified scalar |
Iterator |
scalarIterator()
return an iterator |
int |
size()
return the size of the array |
void |
sort(Comparator compare)
sort this array with the specified comparator |
ScalarArray |
sublist(int from,
int to)
return a view into the array, ideally one that uses the same backing store |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List values
Constructor Detail |
---|
public ListContainer()
public ListContainer(List list)
public ListContainer(Collection initialValues)
Method Detail |
---|
public ScalarArray sublist(int from, int to)
ScalarArray
sublist
in interface ScalarArray
public Scalar pop()
ScalarArray
pop
in interface ScalarArray
public Scalar push(Scalar value)
ScalarArray
push
in interface ScalarArray
public int size()
ScalarArray
size
in interface ScalarArray
public void sort(Comparator compare)
ScalarArray
sort
in interface ScalarArray
public Scalar getAt(int index)
ScalarArray
getAt
in interface ScalarArray
public void remove(Scalar key)
ScalarArray
remove
in interface ScalarArray
public Scalar remove(int index)
ScalarArray
remove
in interface ScalarArray
public Iterator scalarIterator()
ScalarArray
scalarIterator
in interface ScalarArray
public Scalar add(Scalar value, int index)
ScalarArray
add
in interface ScalarArray
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |