Class AbstractImmutableSet<T>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<T>
org.eclipse.collections.impl.collection.immutable.AbstractImmutableCollection<T>
org.eclipse.collections.impl.set.immutable.AbstractImmutableSet<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Set<T>,ImmutableCollection<T>,InternalIterable<T>,RichIterable<T>,ImmutableSet<T>,ImmutableSetIterable<T>,SetIterable<T>,UnsortedSetIterable<T>
public abstract class AbstractImmutableSet<T>
extends AbstractImmutableCollection<T>
implements ImmutableSet<T>, Set<T>
This class is the parent class for all ImmutableSets. All implementations of ImmutableSet must implement the Set
interface so anArraySet.equals(anImmutableSet) can return true when the contents and order are the same.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasParallel(ExecutorService executorService, int batchSize) <B> LazyIterable<Pair<T,B>> cartesianProduct(SetIterable<B> set) <V> ImmutableSet<V>collectBoolean(BooleanFunction<? super T> booleanFunction) collectByte(ByteFunction<? super T> byteFunction) collectChar(CharFunction<? super T> charFunction) collectDouble(DoubleFunction<? super T> doubleFunction) collectFloat(FloatFunction<? super T> floatFunction) <V> ImmutableSet<V>collectInt(IntFunction<? super T> intFunction) collectLong(LongFunction<? super T> longFunction) collectShort(ShortFunction<? super T> shortFunction) <P,V> ImmutableSet<V> collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter) difference(SetIterable<? extends T> subtrahendSet) differenceInto(SetIterable<? extends T> subtrahendSet, R targetSet) <V> ImmutableSet<V>flatCollect(Function<? super T, ? extends Iterable<V>> function) <V> ImmutableSetMultimap<V,T> <V,R extends MutableMultimap<V, T>>
R<V> ImmutableSetMultimap<V,T> groupByEach(Function<? super T, ? extends Iterable<V>> function) <V,R extends MutableMultimap<V, T>>
RgroupByEach(Function<? super T, ? extends Iterable<V>> function, R target) intersect(SetIterable<? extends T> set) intersectInto(SetIterable<? extends T> set, R targetSet) booleanisProperSubsetOf(SetIterable<? extends T> candidateSuperset) booleanisSubsetOf(SetIterable<? extends T> candidateSuperset) newWithAll(Iterable<? extends T> elements) newWithout(T element) newWithoutAll(Iterable<? extends T> elements) <P> PartitionImmutableSet<T>partitionWith(Predicate2<? super T, ? super P> predicate, P parameter) powerSet()<P> ImmutableSet<T>rejectWith(Predicate2<? super T, ? super P> predicate, P parameter) <S> ImmutableSet<S>selectInstancesOf(Class<S> clazz) <P> ImmutableSet<T>selectWith(Predicate2<? super T, ? super P> predicate, P parameter) symmetricDifference(SetIterable<? extends T> setB) symmetricDifferenceInto(SetIterable<? extends T> set, R targetSet) union(SetIterable<? extends T> set) unionInto(SetIterable<? extends T> set, R targetSet) <S> ImmutableSet<Pair<T,S>> Deprecated.in 6.0.Deprecated.in 6.0.Methods inherited from class org.eclipse.collections.impl.collection.immutable.AbstractImmutableCollection
add, addAll, castToCollection, chunk, clear, countBy, countByEach, countByWith, groupByUniqueKey, parallelStream, reduce, remove, removeAll, retainAll, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLong, toArray, toArrayMethods inherited from class org.eclipse.collections.impl.AbstractRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asLazy, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectOptional, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, forEachWith, forEachWithIndex, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.eclipse.collections.api.collection.ImmutableCollection
aggregateBy, aggregateInPlaceBy, castToCollection, countBy, countByEach, countByWith, flatCollectWith, groupByUniqueKey, parallelStream, reduceBy, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from interface org.eclipse.collections.api.set.ImmutableSet
flatCollectWith, toImmutableSetMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, 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, groupByAndCollect, 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, reduceBy, 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, zipWithIndexMethods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayMethods inherited from interface org.eclipse.collections.api.set.SetIterable
equals, hashCode
-
Constructor Details
-
AbstractImmutableSet
public AbstractImmutableSet()
-
-
Method Details
-
castToSet
- Specified by:
castToSetin interfaceImmutableSet<T>
-
newWith
- Specified by:
newWithin interfaceImmutableCollection<T>- Specified by:
newWithin interfaceImmutableSet<T>
-
newWithout
- Specified by:
newWithoutin interfaceImmutableCollection<T>- Specified by:
newWithoutin interfaceImmutableSet<T>
-
newWithAll
- Specified by:
newWithAllin interfaceImmutableCollection<T>- Specified by:
newWithAllin interfaceImmutableSet<T>
-
newWithoutAll
- Specified by:
newWithoutAllin interfaceImmutableCollection<T>- Specified by:
newWithoutAllin interfaceImmutableSet<T>
-
tap
- Specified by:
tapin interfaceImmutableCollection<T>- Specified by:
tapin interfaceImmutableSet<T>- Specified by:
tapin interfaceImmutableSetIterable<T>- Specified by:
tapin interfaceRichIterable<T>- Specified by:
tapin interfaceSetIterable<T>- Specified by:
tapin interfaceUnsortedSetIterable<T>
-
select
- Specified by:
selectin interfaceImmutableCollection<T>- Specified by:
selectin interfaceImmutableSet<T>- Specified by:
selectin interfaceImmutableSetIterable<T>- Specified by:
selectin interfaceRichIterable<T>- Specified by:
selectin interfaceSetIterable<T>- Specified by:
selectin interfaceUnsortedSetIterable<T>
-
selectWith
- Specified by:
selectWithin interfaceImmutableCollection<T>- Specified by:
selectWithin interfaceImmutableSet<T>- Specified by:
selectWithin interfaceImmutableSetIterable<T>- Specified by:
selectWithin interfaceRichIterable<T>- Specified by:
selectWithin interfaceSetIterable<T>- Specified by:
selectWithin interfaceUnsortedSetIterable<T>
-
reject
- Specified by:
rejectin interfaceImmutableCollection<T>- Specified by:
rejectin interfaceImmutableSet<T>- Specified by:
rejectin interfaceImmutableSetIterable<T>- Specified by:
rejectin interfaceRichIterable<T>- Specified by:
rejectin interfaceSetIterable<T>- Specified by:
rejectin interfaceUnsortedSetIterable<T>
-
rejectWith
- Specified by:
rejectWithin interfaceImmutableCollection<T>- Specified by:
rejectWithin interfaceImmutableSet<T>- Specified by:
rejectWithin interfaceImmutableSetIterable<T>- Specified by:
rejectWithin interfaceRichIterable<T>- Specified by:
rejectWithin interfaceSetIterable<T>- Specified by:
rejectWithin interfaceUnsortedSetIterable<T>
-
partition
- Specified by:
partitionin interfaceImmutableCollection<T>- Specified by:
partitionin interfaceImmutableSet<T>- Specified by:
partitionin interfaceImmutableSetIterable<T>- Specified by:
partitionin interfaceRichIterable<T>- Specified by:
partitionin interfaceSetIterable<T>
-
partitionWith
public <P> PartitionImmutableSet<T> partitionWith(Predicate2<? super T, ? super P> predicate, P parameter) - Specified by:
partitionWithin interfaceImmutableCollection<T>- Specified by:
partitionWithin interfaceImmutableSet<T>- Specified by:
partitionWithin interfaceImmutableSetIterable<T>- Specified by:
partitionWithin interfaceRichIterable<T>- Specified by:
partitionWithin interfaceSetIterable<T>
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceImmutableCollection<T>- Specified by:
selectInstancesOfin interfaceImmutableSet<T>- Specified by:
selectInstancesOfin interfaceImmutableSetIterable<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>- Specified by:
selectInstancesOfin interfaceSetIterable<T>- Specified by:
selectInstancesOfin interfaceUnsortedSetIterable<T>
-
collect
- Specified by:
collectin interfaceImmutableCollection<T>- Specified by:
collectin interfaceImmutableSet<T>- Specified by:
collectin interfaceRichIterable<T>- Specified by:
collectin interfaceUnsortedSetIterable<T>
-
collectBoolean
- Specified by:
collectBooleanin interfaceImmutableCollection<T>- Specified by:
collectBooleanin interfaceImmutableSet<T>- Specified by:
collectBooleanin interfaceRichIterable<T>- Specified by:
collectBooleanin interfaceUnsortedSetIterable<T>
-
collectByte
- Specified by:
collectBytein interfaceImmutableCollection<T>- Specified by:
collectBytein interfaceImmutableSet<T>- Specified by:
collectBytein interfaceRichIterable<T>- Specified by:
collectBytein interfaceUnsortedSetIterable<T>
-
collectChar
- Specified by:
collectCharin interfaceImmutableCollection<T>- Specified by:
collectCharin interfaceImmutableSet<T>- Specified by:
collectCharin interfaceRichIterable<T>- Specified by:
collectCharin interfaceUnsortedSetIterable<T>
-
collectDouble
- Specified by:
collectDoublein interfaceImmutableCollection<T>- Specified by:
collectDoublein interfaceImmutableSet<T>- Specified by:
collectDoublein interfaceRichIterable<T>- Specified by:
collectDoublein interfaceUnsortedSetIterable<T>
-
collectFloat
- Specified by:
collectFloatin interfaceImmutableCollection<T>- Specified by:
collectFloatin interfaceImmutableSet<T>- Specified by:
collectFloatin interfaceRichIterable<T>- Specified by:
collectFloatin interfaceUnsortedSetIterable<T>
-
collectInt
- Specified by:
collectIntin interfaceImmutableCollection<T>- Specified by:
collectIntin interfaceImmutableSet<T>- Specified by:
collectIntin interfaceRichIterable<T>- Specified by:
collectIntin interfaceUnsortedSetIterable<T>
-
collectLong
- Specified by:
collectLongin interfaceImmutableCollection<T>- Specified by:
collectLongin interfaceImmutableSet<T>- Specified by:
collectLongin interfaceRichIterable<T>- Specified by:
collectLongin interfaceUnsortedSetIterable<T>
-
collectShort
- Specified by:
collectShortin interfaceImmutableCollection<T>- Specified by:
collectShortin interfaceImmutableSet<T>- Specified by:
collectShortin interfaceRichIterable<T>- Specified by:
collectShortin interfaceUnsortedSetIterable<T>
-
collectWith
public <P,V> ImmutableSet<V> collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter) - Specified by:
collectWithin interfaceImmutableCollection<T>- Specified by:
collectWithin interfaceImmutableSet<T>- Specified by:
collectWithin interfaceRichIterable<T>- Specified by:
collectWithin interfaceUnsortedSetIterable<T>
-
collectIf
public <V> ImmutableSet<V> collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function) - Specified by:
collectIfin interfaceImmutableCollection<T>- Specified by:
collectIfin interfaceImmutableSet<T>- Specified by:
collectIfin interfaceRichIterable<T>- Specified by:
collectIfin interfaceUnsortedSetIterable<T>
-
flatCollect
- Specified by:
flatCollectin interfaceImmutableCollection<T>- Specified by:
flatCollectin interfaceImmutableSet<T>- Specified by:
flatCollectin interfaceRichIterable<T>- Specified by:
flatCollectin interfaceUnsortedSetIterable<T>
-
toImmutable
- Specified by:
toImmutablein interfaceSetIterable<T>- Specified by:
toImmutablein interfaceUnsortedSetIterable<T>
-
groupBy
- Specified by:
groupByin interfaceImmutableCollection<T>- Specified by:
groupByin interfaceImmutableSet<T>- Specified by:
groupByin interfaceImmutableSetIterable<T>- Specified by:
groupByin interfaceRichIterable<T>- Specified by:
groupByin interfaceUnsortedSetIterable<T>
-
groupBy
public <V,R extends MutableMultimap<V, R groupByT>> (Function<? super T, ? extends V> function, R target) - Specified by:
groupByin interfaceRichIterable<T>- Overrides:
groupByin classAbstractRichIterable<T>
-
groupByEach
public <V> ImmutableSetMultimap<V,T> groupByEach(Function<? super T, ? extends Iterable<V>> function) - Specified by:
groupByEachin interfaceImmutableCollection<T>- Specified by:
groupByEachin interfaceImmutableSet<T>- Specified by:
groupByEachin interfaceImmutableSetIterable<T>- Specified by:
groupByEachin interfaceRichIterable<T>- Specified by:
groupByEachin interfaceUnsortedSetIterable<T>
-
groupByEach
public <V,R extends MutableMultimap<V, R groupByEachT>> (Function<? super T, ? extends Iterable<V>> function, R target) - Specified by:
groupByEachin interfaceRichIterable<T>- Overrides:
groupByEachin classAbstractRichIterable<T>
-
zip
Deprecated.in 6.0. UseOrderedIterable.zip(Iterable)instead.- Specified by:
zipin interfaceImmutableCollection<T>- Specified by:
zipin interfaceImmutableSet<T>- Specified by:
zipin interfaceRichIterable<T>- Specified by:
zipin interfaceUnsortedSetIterable<T>
-
zipWithIndex
Deprecated.in 6.0. UseOrderedIterable.zipWithIndex()instead.- Specified by:
zipWithIndexin interfaceImmutableCollection<T>- Specified by:
zipWithIndexin interfaceImmutableSet<T>- Specified by:
zipWithIndexin interfaceImmutableSetIterable<T>- Specified by:
zipWithIndexin interfaceRichIterable<T>- Specified by:
zipWithIndexin interfaceSetIterable<T>- Specified by:
zipWithIndexin interfaceUnsortedSetIterable<T>
-
union
- Specified by:
unionin interfaceImmutableSet<T>- Specified by:
unionin interfaceSetIterable<T>- Specified by:
unionin interfaceUnsortedSetIterable<T>
-
unionInto
- Specified by:
unionIntoin interfaceSetIterable<T>
-
intersect
- Specified by:
intersectin interfaceImmutableSet<T>- Specified by:
intersectin interfaceSetIterable<T>- Specified by:
intersectin interfaceUnsortedSetIterable<T>
-
intersectInto
- Specified by:
intersectIntoin interfaceSetIterable<T>
-
difference
- Specified by:
differencein interfaceImmutableSet<T>- Specified by:
differencein interfaceSetIterable<T>- Specified by:
differencein interfaceUnsortedSetIterable<T>
-
differenceInto
- Specified by:
differenceIntoin interfaceSetIterable<T>
-
symmetricDifference
- Specified by:
symmetricDifferencein interfaceImmutableSet<T>- Specified by:
symmetricDifferencein interfaceSetIterable<T>- Specified by:
symmetricDifferencein interfaceUnsortedSetIterable<T>
-
symmetricDifferenceInto
- Specified by:
symmetricDifferenceIntoin interfaceSetIterable<T>
-
isSubsetOf
- Specified by:
isSubsetOfin interfaceSetIterable<T>
-
isProperSubsetOf
- Specified by:
isProperSubsetOfin interfaceSetIterable<T>
-
powerSet
- Specified by:
powerSetin interfaceImmutableSet<T>- Specified by:
powerSetin interfaceUnsortedSetIterable<T>
-
cartesianProduct
- Specified by:
cartesianProductin interfaceSetIterable<T>
-
asParallel
- Specified by:
asParallelin interfaceSetIterable<T>- Specified by:
asParallelin interfaceUnsortedSetIterable<T>
-