Class UnifiedSetWithHashingStrategy<T>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<T>
org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection<T>
org.eclipse.collections.impl.set.AbstractUnifiedSet<T>
org.eclipse.collections.impl.set.strategy.mutable.UnifiedSetWithHashingStrategy<T>
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Iterable<T>,Collection<T>,Set<T>,MutableCollection<T>,InternalIterable<T>,RichIterable<T>,MutableSet<T>,MutableSetIterable<T>,Pool<T>,SetIterable<T>,UnsortedSetIterable<T>,BatchIterable<T>
public class UnifiedSetWithHashingStrategy<T>
extends AbstractUnifiedSet<T>
implements Externalizable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.No argument default constructor used for serialization.UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy) UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, int initialCapacity) UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, int initialCapacity, float loadFactor) UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, Collection<? extends T> collection) UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, UnifiedSetWithHashingStrategy<T> set) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAllIterable(Iterable<? extends T> iterable) addOrReplace(T key) asParallel(ExecutorService executorService, int batchSize) voidbatchForEach(Procedure<? super T> procedure, int sectionIndex, int sectionCount) voidclear()clone()booleanvoidboolean<P> voidforEachWith(Procedure2<? super T, ? super P> procedure, P parameter) voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) getFirst()getLast()groupByEach(Function<? super T, ? extends Iterable<V>> function) inthashCode()HashingStrategy<? super T>iterator()<V> LazyIterable<V>lazyCollect(Function<? super T, ? extends V> function) Deprecated.since 3.0.lazyReject(Predicate<? super T> predicate) Deprecated.since 3.0.lazySelect(Predicate<? super T> predicate) Deprecated.since 3.0.newEmpty()newEmpty(int size) static <K> UnifiedSetWithHashingStrategy<K>newSet(HashingStrategy<? super K> hashingStrategy) static <K> UnifiedSetWithHashingStrategy<K>newSet(HashingStrategy<? super K> hashingStrategy, int size) static <K> UnifiedSetWithHashingStrategy<K>newSet(HashingStrategy<? super K> hashingStrategy, int size, float loadFactor) static <K> UnifiedSetWithHashingStrategy<K>newSet(HashingStrategy<? super K> hashingStrategy, Iterable<? extends K> source) static <K> UnifiedSetWithHashingStrategy<K>newSet(UnifiedSetWithHashingStrategy<K> set) static <K> UnifiedSetWithHashingStrategy<K>newSetWith(HashingStrategy<? super K> hashingStrategy, K... elements) <P> PartitionMutableSet<T>partitionWith(Predicate2<? super T, ? super P> predicate, P parameter) voidrejectWith(Predicate2<? super T, ? super P> predicate, P parameter) booleanremoveFromPool(T key) booleanretainAllIterable(Iterable<?> iterable) <P> Twin<MutableList<T>>selectAndRejectWith(Predicate2<? super T, ? super P> predicate, P parameter) selectInstancesOf(Class<S> clazz) selectWith(Predicate2<? super T, ? super P> predicate, P parameter) intsize()Object[]toArray()<T> T[]toArray(T[] array) booleanwithoutAll(Iterable<? extends T> elements) voidMethods inherited from class org.eclipse.collections.impl.set.AbstractUnifiedSet
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asSynchronized, asUnmodifiable, cartesianProduct, chunk, collect, collectIf, collectWith, detect, detectOptional, difference, differenceInto, flatCollect, getBatchCount, groupByUniqueKey, injectIntoWith, intersect, intersectInto, isProperSubsetOf, isSubsetOf, noneSatisfy, noneSatisfyWith, powerSet, removeAllIterable, retainAll, symmetricDifference, symmetricDifferenceInto, union, unionInto, zip, zipWithIndexMethods inherited from class org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection
addAll, countBy, countByEach, countByWith, reduce, removeAll, removeIf, removeIfWith, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, asLazy, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, max, max, maxBy, min, min, minBy, 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 interface org.eclipse.collections.impl.parallel.BatchIterable
forEachMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEachMethods inherited from interface org.eclipse.collections.api.collection.MutableCollection
aggregateBy, aggregateInPlaceBy, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, countBy, countByEach, countByWith, flatCollectWith, removeIf, removeIfWith, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from interface org.eclipse.collections.api.set.MutableSet
collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollectWith, toImmutableSetMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, appendString, appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detectIfNone, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, 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, notEmpty, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, 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
addAll, containsAll, isEmpty, removeAll, spliterator
-
Constructor Details
-
UnifiedSetWithHashingStrategy
Deprecated.No argument default constructor used for serialization. Instantiating an UnifiedSetWithHashingStrategyMultimap with this constructor will have a null hashingStrategy and throw NullPointerException when used. -
UnifiedSetWithHashingStrategy
-
UnifiedSetWithHashingStrategy
public UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, int initialCapacity) -
UnifiedSetWithHashingStrategy
public UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, int initialCapacity, float loadFactor) -
UnifiedSetWithHashingStrategy
public UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, Collection<? extends T> collection) -
UnifiedSetWithHashingStrategy
public UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy, UnifiedSetWithHashingStrategy<T> set)
-
-
Method Details
-
newSet
public static <K> UnifiedSetWithHashingStrategy<K> newSet(HashingStrategy<? super K> hashingStrategy) -
newSet
-
newSet
public static <K> UnifiedSetWithHashingStrategy<K> newSet(HashingStrategy<? super K> hashingStrategy, int size) -
newSet
public static <K> UnifiedSetWithHashingStrategy<K> newSet(HashingStrategy<? super K> hashingStrategy, Iterable<? extends K> source) -
newSet
public static <K> UnifiedSetWithHashingStrategy<K> newSet(HashingStrategy<? super K> hashingStrategy, int size, float loadFactor) -
newSetWith
public static <K> UnifiedSetWithHashingStrategy<K> newSetWith(HashingStrategy<? super K> hashingStrategy, K... elements) -
hashingStrategy
-
clear
public void clear() -
add
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceSet<T>- Overrides:
addin classAbstractMutableCollection<T>
-
addOrReplace
-
contains
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceRichIterable<T>- Specified by:
containsin interfaceSet<T>- Overrides:
containsin classAbstractRichIterable<T>
-
batchForEach
- Specified by:
batchForEachin interfaceBatchIterable<T>
-
tap
- Specified by:
tapin interfaceMutableCollection<T>- Specified by:
tapin interfaceMutableSet<T>- Specified by:
tapin interfaceMutableSetIterable<T>- Specified by:
tapin interfaceRichIterable<T>- Specified by:
tapin interfaceSetIterable<T>- Specified by:
tapin interfaceUnsortedSetIterable<T>
-
each
- Specified by:
eachin interfaceRichIterable<T>
-
forEachWith
- Specified by:
forEachWithin interfaceInternalIterable<T>- Overrides:
forEachWithin classAbstractRichIterable<T>
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Overrides:
forEachWithIndexin classAbstractRichIterable<T>
-
newEmpty
- Specified by:
newEmptyin interfaceMutableCollection<T>- Specified by:
newEmptyin interfaceMutableSet<T>
-
newEmpty
- Specified by:
newEmptyin classAbstractUnifiedSet<T>
-
getFirst
- Specified by:
getFirstin interfaceRichIterable<T>
-
getLast
- Specified by:
getLastin interfaceRichIterable<T>
-
select
- Specified by:
selectin interfaceMutableCollection<T>- Specified by:
selectin interfaceMutableSet<T>- Specified by:
selectin interfaceMutableSetIterable<T>- Specified by:
selectin interfaceRichIterable<T>- Specified by:
selectin interfaceSetIterable<T>- Specified by:
selectin interfaceUnsortedSetIterable<T>
-
selectWith
public <P> UnifiedSetWithHashingStrategy<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter) - Specified by:
selectWithin interfaceMutableCollection<T>- Specified by:
selectWithin interfaceMutableSet<T>- Specified by:
selectWithin interfaceMutableSetIterable<T>- Specified by:
selectWithin interfaceRichIterable<T>- Specified by:
selectWithin interfaceSetIterable<T>- Specified by:
selectWithin interfaceUnsortedSetIterable<T>
-
reject
- Specified by:
rejectin interfaceMutableCollection<T>- Specified by:
rejectin interfaceMutableSet<T>- Specified by:
rejectin interfaceMutableSetIterable<T>- Specified by:
rejectin interfaceRichIterable<T>- Specified by:
rejectin interfaceSetIterable<T>- Specified by:
rejectin interfaceUnsortedSetIterable<T>
-
rejectWith
public <P> UnifiedSetWithHashingStrategy<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter) - Specified by:
rejectWithin interfaceMutableCollection<T>- Specified by:
rejectWithin interfaceMutableSet<T>- Specified by:
rejectWithin interfaceMutableSetIterable<T>- Specified by:
rejectWithin interfaceRichIterable<T>- Specified by:
rejectWithin interfaceSetIterable<T>- Specified by:
rejectWithin interfaceUnsortedSetIterable<T>
-
selectAndRejectWith
public <P> Twin<MutableList<T>> selectAndRejectWith(Predicate2<? super T, ? super P> predicate, P parameter) - Specified by:
selectAndRejectWithin interfaceMutableCollection<T>- Overrides:
selectAndRejectWithin classAbstractMutableCollection<T>
-
partition
- Specified by:
partitionin interfaceMutableCollection<T>- Specified by:
partitionin interfaceMutableSet<T>- Specified by:
partitionin interfaceMutableSetIterable<T>- Specified by:
partitionin interfaceRichIterable<T>- Specified by:
partitionin interfaceSetIterable<T>
-
partitionWith
public <P> PartitionMutableSet<T> partitionWith(Predicate2<? super T, ? super P> predicate, P parameter) - Specified by:
partitionWithin interfaceMutableCollection<T>- Specified by:
partitionWithin interfaceMutableSet<T>- Specified by:
partitionWithin interfaceMutableSetIterable<T>- Specified by:
partitionWithin interfaceRichIterable<T>- Specified by:
partitionWithin interfaceSetIterable<T>
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceMutableCollection<T>- Specified by:
selectInstancesOfin interfaceMutableSet<T>- Specified by:
selectInstancesOfin interfaceMutableSetIterable<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>- Specified by:
selectInstancesOfin interfaceSetIterable<T>- Specified by:
selectInstancesOfin interfaceUnsortedSetIterable<T>
-
lazySelect
Deprecated.since 3.0. UseAbstractRichIterable.asLazy().select(Predicate)instead. -
lazyReject
Deprecated.since 3.0. UseAbstractRichIterable.asLazy().reject(Predicate)instead. -
lazyCollect
Deprecated.since 3.0. UseAbstractRichIterable.asLazy().AbstractUnifiedSet.collect(Function)instead. -
toImmutable
- Specified by:
toImmutablein interfaceMutableCollection<T>- Specified by:
toImmutablein interfaceMutableSet<T>- Specified by:
toImmutablein interfaceSetIterable<T>- Specified by:
toImmutablein interfaceUnsortedSetIterable<T>
-
with
- Specified by:
within interfaceMutableCollection<T>- Specified by:
within interfaceMutableSet<T>- Specified by:
within interfaceMutableSetIterable<T>
-
with
-
with
-
with
-
withAll
- Specified by:
withAllin interfaceMutableCollection<T>- Specified by:
withAllin interfaceMutableSet<T>- Specified by:
withAllin interfaceMutableSetIterable<T>
-
without
- Specified by:
withoutin interfaceMutableCollection<T>- Specified by:
withoutin interfaceMutableSet<T>- Specified by:
withoutin interfaceMutableSetIterable<T>
-
withoutAll
- Specified by:
withoutAllin interfaceMutableCollection<T>- Specified by:
withoutAllin interfaceMutableSet<T>- Specified by:
withoutAllin interfaceMutableSetIterable<T>
-
addAllIterable
- Specified by:
addAllIterablein interfaceMutableCollection<T>- Overrides:
addAllIterablein classAbstractMutableCollection<T>
-
remove
- Specified by:
removein interfaceCollection<T>- Specified by:
removein interfaceSet<T>- Overrides:
removein classAbstractMutableCollection<T>
-
size
public int size()- Specified by:
sizein interfaceBatchIterable<T>- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfacePool<T>- Specified by:
sizein interfaceRichIterable<T>- Specified by:
sizein interfaceSet<T>
-
equals
-
hashCode
public int hashCode() -
trimToSize
public boolean trimToSize() -
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
retainAllIterable
- Specified by:
retainAllIterablein interfaceMutableCollection<T>- Overrides:
retainAllIterablein classAbstractMutableCollection<T>
-
clone
- Specified by:
clonein interfaceMutableSet<T>- Specified by:
clonein classAbstractUnifiedSet<T>
-
toArray
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceMutableCollection<T>- Specified by:
toArrayin interfaceMutableSetIterable<T>- Specified by:
toArrayin interfaceRichIterable<T>- Specified by:
toArrayin interfaceSet<T>
-
toArray
public <T> T[] toArray(T[] array) - Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceMutableCollection<T>- Specified by:
toArrayin interfaceMutableSetIterable<T>- Specified by:
toArrayin interfaceRichIterable<T>- Specified by:
toArrayin interfaceSet<T>
-
iterator
-
groupBy
public <V> UnifiedSetWithHashingStrategyMultimap<V,T> groupBy(Function<? super T, ? extends V> function) - Specified by:
groupByin interfaceMutableCollection<T>- Specified by:
groupByin interfaceMutableSet<T>- Specified by:
groupByin interfaceMutableSetIterable<T>- Specified by:
groupByin interfaceRichIterable<T>- Specified by:
groupByin interfaceUnsortedSetIterable<T>
-
groupByEach
public <V> UnifiedSetWithHashingStrategyMultimap<V,T> groupByEach(Function<? super T, ? extends Iterable<V>> function) - Specified by:
groupByEachin interfaceMutableCollection<T>- Specified by:
groupByEachin interfaceMutableSet<T>- Specified by:
groupByEachin interfaceMutableSetIterable<T>- Specified by:
groupByEachin interfaceRichIterable<T>- Specified by:
groupByEachin interfaceUnsortedSetIterable<T>
-
get
-
put
-
removeFromPool
- Specified by:
removeFromPoolin interfacePool<T>
-
asParallel
- Specified by:
asParallelin interfaceSetIterable<T>- Specified by:
asParallelin interfaceUnsortedSetIterable<T>
-