public interface ImmutableSet<T>
extends java.lang.Iterable<T>, java.io.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(java.lang.Object o) |
boolean |
exists(java.util.function.Predicate<T> predicate)
return true if predicate is fullfilled for at least one element
|
int |
hashCode() |
ImmutableSet<T> |
intersect(ImmutableSet<? extends T> set) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
ImmutableSet<T> |
remove(T element) |
int |
size() |
java.util.stream.Stream<T> |
stream() |
boolean |
subset(ImmutableSet<T> s) |
<S> S[] |
toArray(S[] array)
Convert the set to a Java array
|
java.util.Set<T> |
toSet() |
ImmutableSet<T> |
union(ImmutableSet<? extends T> set) |
java.util.Set<T> toSet()
Set containing the same elements as this ImmutableSetImmutableSet<T> add(T element)
ImmutableSet<T> union(ImmutableSet<? extends T> set)
ImmutableSet<T> intersect(ImmutableSet<? extends T> set)
java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>java.util.stream.Stream<T> stream()
boolean exists(java.util.function.Predicate<T> predicate)
predicate - the predicateboolean contains(T obj)
boolean subset(ImmutableSet<T> s)
int size()
boolean isEmpty()
ImmutableSet<T> remove(T element)
boolean equals(java.lang.Object o)
equals in class java.lang.Objectint hashCode()
hashCode in class java.lang.ObjectImmutableSet<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)