public interface ImmutableSet<T> extends Iterable<T>, Serializable
Modifier and Type | Method and Description |
---|---|
ImmutableSet<T> |
add(T element)
adds an element
|
ImmutableSet<T> |
addUnique(T element)
adds an element, barfs if the element is already present
|
boolean |
contains(T obj) |
boolean |
equals(Object o) |
int |
hashCode() |
ImmutableSet<T> |
intersect(ImmutableSet<T> set) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
ImmutableSet<T> |
remove(T element) |
int |
size() |
boolean |
subset(ImmutableSet<T> s) |
<S> S[] |
toArray(S[] array)
Convert the set to a Java array
|
ImmutableSet<T> |
union(ImmutableSet<T> set) |
forEach, spliterator
ImmutableSet<T> add(T element)
ImmutableSet<T> union(ImmutableSet<T> set)
ImmutableSet<T> intersect(ImmutableSet<T> set)
boolean contains(T obj)
boolean subset(ImmutableSet<T> s)
int size()
boolean isEmpty()
ImmutableSet<T> remove(T element)
boolean equals(Object o)
ImmutableSet<T> addUnique(T element) throws NotUniqueException
element
- of type org.key_project.utils.collection.NotUniqueException
- if the element is already presentNotUniqueException
<S> S[] toArray(S[] array)