|
||||||||||
| 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<T>
edu.mit.csail.sdg.alloy4.ConstList<T>
T - - the type of elementpublic final class ConstList<T>
Immutable; implements a list based on equals(); null values are allowed.
| Nested Class Summary | |
|---|---|
static class |
ConstList.TempList<T>
Mutable; this implements a modifiable list that can be used to construct a ConstList; null values are allowed. |
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Method Summary | ||
|---|---|---|
T |
get(int index)
Returns the i-th element |
|
static
|
make()
Return an unmodifiable empty list. |
|
static
|
make(int n,
T elem)
Return an unmodifiable list consisting of "n" references to "elem". |
|
static
|
make(java.lang.Iterable<T> collection)
Return an unmodifiable list with the same elements as the given collection. |
|
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 |
| Method Detail |
|---|
public static <T> ConstList<T> make()
public static <T> ConstList<T> make(int n,
T elem)
public static <T> ConstList<T> make(java.lang.Iterable<T> collection)
public T get(int index)
get in interface java.util.List<T>get in class java.util.AbstractList<T>java.lang.ArrayIndexOutOfBoundsException - if the given index doesn't existpublic int size()
size in interface java.util.Collection<T>size in interface java.util.List<T>size in class java.util.AbstractCollection<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||