Package com.floragunn.fluent.collections
Interface ImmutableSet<E>
-
- All Superinterfaces:
Collection<E>,Iterable<E>,Set<E>,UnmodifiableCollection<E>,UnmodifiableSet<E>
public interface ImmutableSet<E> extends UnmodifiableSet<E>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classImmutableSet.Builder<E>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Eany()static <E> Collector<E,?,ImmutableSet<E>>collector()booleancontainsAny(Collection<E> e)static <E> ImmutableSet<E>empty()static <E> ImmutableSet<E>flattenDeep(Collection<?> collection, Function<Object,E> mappingFunction)booleanforAllApplies(Predicate<E> predicate)booleanforAnyApplies(Predicate<E> predicate)ImmutableSet<E>intersection(Set<E> other)Iterable<E>iterateMatching(Predicate<E> predicate)static <C,E>
ImmutableSet<E>map(Collection<C> collection, Function<C,E> mappingFunction)<O> ImmutableSet<O>map(Function<E,O> mappingFunction)<O> ImmutableSet<O>mapFlat(Function<E,Collection<O>> mappingFunction)ImmutableSet<E>matching(Predicate<E> predicate)static <E> ImmutableSet<E>of(E e)static <E> ImmutableSet<E>of(E e1, E e2)static <E> ImmutableSet<E>of(E e, E... more)static <E> ImmutableSet<E>of(Iterable<E> iterable)static <E> ImmutableSet<E>of(Collection<E> collection)static <E> ImmutableSet<E>of(Set<E> set)static <E> ImmutableSet<E>of(Set<E> set, E other)static <E> ImmutableSet<E>ofArray(E... array)static <E> ImmutableSet<E>ofNonNull(E e1, E e2)Eonly()ImmutableList<E>toList()<V> ImmutableMap<E,V>toMap(Function<E,V> mappingFunction)StringtoShortString()ImmutableSet<E>with(E other)ImmutableSet<E>with(E... other)ImmutableSet<E>with(Collection<E> other)ImmutableSet<E>without(E other)ImmutableSet<E>without(Collection<E> other)default ImmutableSet<E>withoutMatching(Predicate<E> predicate)-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.Set
contains, containsAll, equals, hashCode, isEmpty, iterator, size, spliterator, toArray, toArray
-
Methods inherited from interface com.floragunn.fluent.collections.UnmodifiableCollection
iterator
-
-
-
-
Method Detail
-
empty
static <E> ImmutableSet<E> empty()
-
of
static <E> ImmutableSet<E> of(E e)
-
of
static <E> ImmutableSet<E> of(E e1, E e2)
-
ofNonNull
static <E> ImmutableSet<E> ofNonNull(E e1, E e2)
-
of
@SafeVarargs static <E> ImmutableSet<E> of(E e, E... more)
-
ofArray
@SafeVarargs static <E> ImmutableSet<E> ofArray(E... array)
-
of
static <E> ImmutableSet<E> of(Set<E> set)
-
of
static <E> ImmutableSet<E> of(Collection<E> collection)
-
of
static <E> ImmutableSet<E> of(Iterable<E> iterable)
-
of
static <E> ImmutableSet<E> of(Set<E> set, E other)
-
flattenDeep
static <E> ImmutableSet<E> flattenDeep(Collection<?> collection, Function<Object,E> mappingFunction)
-
map
static <C,E> ImmutableSet<E> map(Collection<C> collection, Function<C,E> mappingFunction)
-
collector
static <E> Collector<E,?,ImmutableSet<E>> collector()
-
with
ImmutableSet<E> with(E other)
-
with
ImmutableSet<E> with(Collection<E> other)
-
with
ImmutableSet<E> with(E... other)
-
matching
ImmutableSet<E> matching(Predicate<E> predicate)
-
withoutMatching
default ImmutableSet<E> withoutMatching(Predicate<E> predicate)
-
intersection
ImmutableSet<E> intersection(Set<E> other)
-
without
ImmutableSet<E> without(Collection<E> other)
-
without
ImmutableSet<E> without(E other)
-
map
<O> ImmutableSet<O> map(Function<E,O> mappingFunction)
-
mapFlat
<O> ImmutableSet<O> mapFlat(Function<E,Collection<O>> mappingFunction)
-
toList
ImmutableList<E> toList()
-
toMap
<V> ImmutableMap<E,V> toMap(Function<E,V> mappingFunction)
-
containsAny
boolean containsAny(Collection<E> e)
-
only
E only()
-
any
E any()
-
toShortString
String toShortString()
-
-