|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
edu.mit.csail.sdg.alloy4.JoinableList<E>
public final class JoinableList<E>
Immutable; implements a list where it is combine them; null values are NOT allowed.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
JoinableList()
Construct an empty list. |
|
JoinableList(E item)
Construct a list containing a single item, or return an empty list if item==null. |
|
| Method Summary | |
|---|---|
E |
get(int i)
Return the i-th element |
JoinableList<E> |
make(E newItem)
Returns a list that represents the result of appending newItem onto this list; if newItem==null we return this list as-is. |
JoinableList<E> |
make(JoinableList<E> that)
Returns a list that represents the concatenation of this list and that list. |
E |
pick()
If the list if nonempty, arbitrarily return one of the item, otherwise throw ArrayIndexOutOfBoundsException. |
int |
size()
Returns the number of elements in this list. |
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public JoinableList()
public JoinableList(E item)
| Method Detail |
|---|
public JoinableList<E> make(JoinableList<E> that)
public JoinableList<E> make(E newItem)
public E pick()
public E get(int i)
get in interface java.util.List<E>get in class java.util.AbstractList<E>java.lang.ArrayIndexOutOfBoundsException - if the given index doesn't existpublic int size()
size in interface java.util.Collection<E>size in interface java.util.List<E>size in class java.util.AbstractCollection<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||