public final class SetAdapter<T> extends AbstractCollectionAdapter<T> implements Serializable, MutableSet<T>
To create a new wrapper around an existing Set instance, use the adapt(Set) factory method.
| Modifier and Type | Method and Description |
|---|---|
static <E> MutableSet<E> |
adapt(Set<E> set) |
ParallelUnsortedSetIterable<T> |
asParallel(ExecutorService executorService,
int batchSize) |
MutableSet<T> |
asSynchronized() |
MutableSet<T> |
asUnmodifiable() |
<B> LazyIterable<Pair<T,B>> |
cartesianProduct(SetIterable<B> set) |
MutableSet<T> |
clone() |
<V> MutableSet<V> |
collect(Function<? super T,? extends V> function) |
<V> MutableSet<V> |
collectIf(Predicate<? super T> predicate,
Function<? super T,? extends V> function) |
<P,V> MutableSet<V> |
collectWith(Function2<? super T,? super P,? extends V> function,
P parameter) |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> collection) |
MutableSet<T> |
difference(SetIterable<? extends T> subtrahendSet) |
<R extends Set<T>> |
differenceInto(SetIterable<? extends T> subtrahendSet,
R targetSet) |
boolean |
equals(Object obj) |
<V> MutableSet<V> |
flatCollect(Function<? super T,? extends Iterable<V>> function) |
<V> UnifiedSetMultimap<V,T> |
groupBy(Function<? super T,? extends V> function) |
<V> UnifiedSetMultimap<V,T> |
groupByEach(Function<? super T,? extends Iterable<V>> function) |
int |
hashCode() |
MutableSet<T> |
intersect(SetIterable<? extends T> set) |
<R extends Set<T>> |
intersectInto(SetIterable<? extends T> set,
R targetSet) |
boolean |
isProperSubsetOf(SetIterable<? extends T> candidateSuperset) |
boolean |
isSubsetOf(SetIterable<? extends T> candidateSuperset) |
MutableSet<T> |
newEmpty()
Deprecated.
use
UnifiedSet.newSet() instead (inlineable) |
PartitionMutableSet<T> |
partition(Predicate<? super T> predicate) |
<P> PartitionMutableSet<T> |
partitionWith(Predicate2<? super T,? super P> predicate,
P parameter) |
MutableSet<UnsortedSetIterable<T>> |
powerSet() |
MutableSet<T> |
reject(Predicate<? super T> predicate) |
<P> MutableSet<T> |
rejectWith(Predicate2<? super T,? super P> predicate,
P parameter) |
boolean |
removeAllIterable(Iterable<?> iterable) |
MutableSet<T> |
select(Predicate<? super T> predicate) |
<S> MutableSet<S> |
selectInstancesOf(Class<S> clazz) |
<P> MutableSet<T> |
selectWith(Predicate2<? super T,? super P> predicate,
P parameter) |
MutableSet<T> |
symmetricDifference(SetIterable<? extends T> setB) |
<R extends Set<T>> |
symmetricDifferenceInto(SetIterable<? extends T> set,
R targetSet) |
MutableSet<T> |
tap(Procedure<? super T> procedure) |
ImmutableSet<T> |
toImmutable() |
MutableSet<T> |
union(SetIterable<? extends T> set) |
<R extends Set<T>> |
unionInto(SetIterable<? extends T> set,
R targetSet) |
SetAdapter<T> |
with(T... elements) |
SetAdapter<T> |
with(T element) |
SetAdapter<T> |
with(T element1,
T element2) |
SetAdapter<T> |
with(T element1,
T element2,
T element3) |
SetAdapter<T> |
withAll(Iterable<? extends T> elements) |
SetAdapter<T> |
without(T element) |
SetAdapter<T> |
withoutAll(Iterable<? extends T> elements) |
<S> MutableSet<Pair<T,S>> |
zip(Iterable<S> that)
Deprecated.
in 6.0. Use
OrderedIterable.zip(Iterable) instead. |
MutableSet<Pair<T,Integer>> |
zipWithIndex()
Deprecated.
in 6.0. Use
OrderedIterable.zipWithIndex() instead. |
add, addAll, addAllIterable, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, asLazy, chunk, clear, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, into, isEmpty, iterator, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, remove, removeAll, removeIf, removeIfWith, retainAll, retainAllIterable, select, selectAndRejectWith, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toString, zip, zipWithIndexcollectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollectWith, toImmutableSetaddAllIterable, aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, groupByUniqueKey, injectIntoWith, removeIf, removeIfWith, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongaggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexforEach, forEachWith, forEachWithIndexadd, addAll, clear, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streampublic MutableSet<T> asUnmodifiable()
asUnmodifiable in interface MutableCollection<T>asUnmodifiable in interface MutableSet<T>public MutableSet<T> asSynchronized()
asSynchronized in interface MutableCollection<T>asSynchronized in interface MutableSet<T>public ImmutableSet<T> toImmutable()
toImmutable in interface MutableCollection<T>toImmutable in interface MutableSet<T>toImmutable in interface SetIterable<T>toImmutable in interface UnsortedSetIterable<T>public static <E> MutableSet<E> adapt(Set<E> set)
public MutableSet<T> clone()
clone in interface MutableSet<T>clone in class Objectpublic boolean contains(Object o)
contains in interface Collection<T>contains in interface Set<T>contains in interface RichIterable<T>contains in class AbstractCollectionAdapter<T>public boolean containsAll(Collection<?> collection)
containsAll in interface Collection<T>containsAll in interface Set<T>containsAll in interface RichIterable<T>containsAll in class AbstractCollectionAdapter<T>public boolean equals(Object obj)
public int hashCode()
public SetAdapter<T> with(T element)
with in interface MutableCollection<T>with in interface MutableSet<T>with in interface MutableSetIterable<T>public SetAdapter<T> with(T element1, T element2)
public SetAdapter<T> with(T element1, T element2, T element3)
public SetAdapter<T> with(T... elements)
public SetAdapter<T> without(T element)
without in interface MutableCollection<T>without in interface MutableSet<T>without in interface MutableSetIterable<T>public SetAdapter<T> withAll(Iterable<? extends T> elements)
withAll in interface MutableCollection<T>withAll in interface MutableSet<T>withAll in interface MutableSetIterable<T>public SetAdapter<T> withoutAll(Iterable<? extends T> elements)
withoutAll in interface MutableCollection<T>withoutAll in interface MutableSet<T>withoutAll in interface MutableSetIterable<T>@Deprecated public MutableSet<T> newEmpty()
UnifiedSet.newSet() instead (inlineable)newEmpty in interface MutableCollection<T>newEmpty in interface MutableSet<T>public MutableSet<T> tap(Procedure<? super T> procedure)
tap in interface MutableCollection<T>tap in interface RichIterable<T>tap in interface MutableSet<T>tap in interface MutableSetIterable<T>tap in interface SetIterable<T>tap in interface UnsortedSetIterable<T>tap in class AbstractCollectionAdapter<T>public MutableSet<T> select(Predicate<? super T> predicate)
select in interface MutableCollection<T>select in interface RichIterable<T>select in interface MutableSet<T>select in interface MutableSetIterable<T>select in interface SetIterable<T>select in interface UnsortedSetIterable<T>select in class AbstractCollectionAdapter<T>public MutableSet<T> reject(Predicate<? super T> predicate)
reject in interface MutableCollection<T>reject in interface RichIterable<T>reject in interface MutableSet<T>reject in interface MutableSetIterable<T>reject in interface SetIterable<T>reject in interface UnsortedSetIterable<T>reject in class AbstractCollectionAdapter<T>public PartitionMutableSet<T> partition(Predicate<? super T> predicate)
partition in interface MutableCollection<T>partition in interface RichIterable<T>partition in interface MutableSet<T>partition in interface MutableSetIterable<T>partition in interface SetIterable<T>partition in class AbstractCollectionAdapter<T>public <P> PartitionMutableSet<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
partitionWith in interface MutableCollection<T>partitionWith in interface RichIterable<T>partitionWith in interface MutableSet<T>partitionWith in interface MutableSetIterable<T>partitionWith in interface SetIterable<T>partitionWith in class AbstractCollectionAdapter<T>public <S> MutableSet<S> selectInstancesOf(Class<S> clazz)
selectInstancesOf in interface MutableCollection<T>selectInstancesOf in interface RichIterable<T>selectInstancesOf in interface MutableSet<T>selectInstancesOf in interface MutableSetIterable<T>selectInstancesOf in interface SetIterable<T>selectInstancesOf in interface UnsortedSetIterable<T>selectInstancesOf in class AbstractCollectionAdapter<T>public <V> MutableSet<V> collect(Function<? super T,? extends V> function)
collect in interface MutableCollection<T>collect in interface RichIterable<T>collect in interface MutableSet<T>collect in interface UnsortedSetIterable<T>collect in class AbstractCollectionAdapter<T>public <V> MutableSet<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
flatCollect in interface MutableCollection<T>flatCollect in interface RichIterable<T>flatCollect in interface MutableSet<T>flatCollect in interface UnsortedSetIterable<T>flatCollect in class AbstractCollectionAdapter<T>public <V> MutableSet<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
collectIf in interface MutableCollection<T>collectIf in interface RichIterable<T>collectIf in interface MutableSet<T>collectIf in interface UnsortedSetIterable<T>collectIf in class AbstractCollectionAdapter<T>public <V> UnifiedSetMultimap<V,T> groupBy(Function<? super T,? extends V> function)
groupBy in interface MutableCollection<T>groupBy in interface RichIterable<T>groupBy in interface MutableSet<T>groupBy in interface MutableSetIterable<T>groupBy in interface UnsortedSetIterable<T>groupBy in class AbstractCollectionAdapter<T>public <V> UnifiedSetMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
groupByEach in interface MutableCollection<T>groupByEach in interface RichIterable<T>groupByEach in interface MutableSet<T>groupByEach in interface MutableSetIterable<T>groupByEach in interface UnsortedSetIterable<T>groupByEach in class AbstractCollectionAdapter<T>public <P> MutableSet<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
selectWith in interface MutableCollection<T>selectWith in interface RichIterable<T>selectWith in interface MutableSet<T>selectWith in interface MutableSetIterable<T>selectWith in interface SetIterable<T>selectWith in interface UnsortedSetIterable<T>selectWith in class AbstractCollectionAdapter<T>public <P> MutableSet<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
rejectWith in interface MutableCollection<T>rejectWith in interface RichIterable<T>rejectWith in interface MutableSet<T>rejectWith in interface MutableSetIterable<T>rejectWith in interface SetIterable<T>rejectWith in interface UnsortedSetIterable<T>rejectWith in class AbstractCollectionAdapter<T>public <P,V> MutableSet<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
collectWith in interface MutableCollection<T>collectWith in interface RichIterable<T>collectWith in interface MutableSet<T>collectWith in interface UnsortedSetIterable<T>collectWith in class AbstractCollectionAdapter<T>@Deprecated public <S> MutableSet<Pair<T,S>> zip(Iterable<S> that)
OrderedIterable.zip(Iterable) instead.zip in interface MutableCollection<T>zip in interface RichIterable<T>zip in interface MutableSet<T>zip in interface MutableSetIterable<T>zip in interface UnsortedSetIterable<T>zip in class AbstractCollectionAdapter<T>@Deprecated public MutableSet<Pair<T,Integer>> zipWithIndex()
OrderedIterable.zipWithIndex() instead.zipWithIndex in interface MutableCollection<T>zipWithIndex in interface RichIterable<T>zipWithIndex in interface MutableSet<T>zipWithIndex in interface MutableSetIterable<T>zipWithIndex in interface SetIterable<T>zipWithIndex in interface UnsortedSetIterable<T>zipWithIndex in class AbstractCollectionAdapter<T>public boolean removeAllIterable(Iterable<?> iterable)
removeAllIterable in interface MutableCollection<T>removeAllIterable in class AbstractCollectionAdapter<T>public MutableSet<T> union(SetIterable<? extends T> set)
union in interface MutableSet<T>union in interface SetIterable<T>union in interface UnsortedSetIterable<T>public <R extends Set<T>> R unionInto(SetIterable<? extends T> set, R targetSet)
unionInto in interface SetIterable<T>public MutableSet<T> intersect(SetIterable<? extends T> set)
intersect in interface MutableSet<T>intersect in interface SetIterable<T>intersect in interface UnsortedSetIterable<T>public <R extends Set<T>> R intersectInto(SetIterable<? extends T> set, R targetSet)
intersectInto in interface SetIterable<T>public MutableSet<T> difference(SetIterable<? extends T> subtrahendSet)
difference in interface MutableSet<T>difference in interface SetIterable<T>difference in interface UnsortedSetIterable<T>public <R extends Set<T>> R differenceInto(SetIterable<? extends T> subtrahendSet, R targetSet)
differenceInto in interface SetIterable<T>public MutableSet<T> symmetricDifference(SetIterable<? extends T> setB)
symmetricDifference in interface MutableSet<T>symmetricDifference in interface SetIterable<T>symmetricDifference in interface UnsortedSetIterable<T>public <R extends Set<T>> R symmetricDifferenceInto(SetIterable<? extends T> set, R targetSet)
symmetricDifferenceInto in interface SetIterable<T>public boolean isSubsetOf(SetIterable<? extends T> candidateSuperset)
isSubsetOf in interface SetIterable<T>public boolean isProperSubsetOf(SetIterable<? extends T> candidateSuperset)
isProperSubsetOf in interface SetIterable<T>public MutableSet<UnsortedSetIterable<T>> powerSet()
powerSet in interface MutableSet<T>powerSet in interface UnsortedSetIterable<T>public <B> LazyIterable<Pair<T,B>> cartesianProduct(SetIterable<B> set)
cartesianProduct in interface SetIterable<T>public ParallelUnsortedSetIterable<T> asParallel(ExecutorService executorService, int batchSize)
asParallel in interface SetIterable<T>asParallel in interface UnsortedSetIterable<T>Copyright © 2004–2022. All rights reserved.