|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<K>
edu.mit.csail.sdg.alloy4.ConstSet<K>
K - - the type of elementpublic final class ConstSet<K>
Immutable; implements a set based on hashCode() and equals(); null value is allowed.
| Method Summary | ||
|---|---|---|
boolean |
contains(java.lang.Object element)
Returns true if the given object is in this set. |
|
java.util.Iterator<K> |
iterator()
Returns a read-only iterator over this set. |
|
static
|
make()
Returns an unmodifiable empty set. |
|
static
|
make(java.lang.Iterable<K> collection)
Returns an unmodifiable set with the same elements and traversal order as the given set. |
|
int |
size()
Returns the number of objects in this set. |
|
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
add, addAll, clear, containsAll, isEmpty, remove, 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.Set |
|---|
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray |
| Method Detail |
|---|
public static <K> ConstSet<K> make()
public static <K> ConstSet<K> make(java.lang.Iterable<K> collection)
public int size()
size in interface java.util.Collection<K>size in interface java.util.Set<K>size in class java.util.AbstractCollection<K>public java.util.Iterator<K> iterator()
iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in interface java.util.Set<K>iterator in class java.util.AbstractCollection<K>public boolean contains(java.lang.Object element)
contains in interface java.util.Collection<K>contains in interface java.util.Set<K>contains in class java.util.AbstractCollection<K>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||