|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.mit.csail.aeolus.api.AeolusSequence<T>
T
- public final class AeolusSequence<T extends AeolusSafe & java.io.Serializable>
This class is used to create immutable (non-linked) list share-able objects in Aeolus. The elements of this container object are also required to be "safe-to-share" ie immutable as well. So, no copying of elements is needed. "T extends AeolusSafe" causes no copying: i.e., ClassLoader will complain if T is not AeolusSafe.
Constructor Summary | |
---|---|
AeolusSequence()
Construct an empty AeolusSequence. |
|
AeolusSequence(java.util.Collection<T> al)
Construct an AeolusSequence given a Collection. |
Method Summary | |
---|---|
AeolusSequence<T> |
add(T o)
The add method creates an new AeolusSequence which is a copy of this with a new element added onto the end of the sequence. |
boolean |
equals(AeolusSequence sq)
The equals method returns true if this sequence's elements are equal to the elements of sq and otherwise returns false. |
T |
get(int index)
The get method returns the element at index in the AeolusSequence |
boolean |
isEmpty()
The empty method returns true if the AeolusSequence is empty and otherwise returns false |
AeolusSequence<T> |
remove(int index)
The remove method creates an new AeolusSequence. |
AeolusSequence<T> |
set(int index,
T o)
The set method creates an new AeolusSequence. |
int |
size()
The size method returns the number of elements in the AeolusSequence |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AeolusSequence()
public AeolusSequence(java.util.Collection<T> al)
Method Detail |
---|
public AeolusSequence<T> add(T o)
public boolean equals(AeolusSequence sq)
public T get(int index)
java.lang.IndexOutOfBoundsException
- if index < 0 or >= sizepublic boolean isEmpty()
public AeolusSequence<T> remove(int index)
java.lang.IndexOutOfBoundsException
- if index < 0 or >= sizepublic AeolusSequence<T> set(int index, T o)
java.lang.IndexOutOfBoundsException
- if index < 0 or >= sizepublic int size()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |