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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnifiedSetWithHashingStrategy()Deprecated.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
-
Methods 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, zipWithIndex
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.AbstractMutableCollection
addAll, countBy, countByEach, countByWith, reduce, removeAll, removeIf, removeIfWith, sumByDouble, sumByFloat, sumByInt, sumByLong
-
Methods 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, zipWithIndex
-
Methods inherited from interface org.eclipse.collections.impl.parallel.BatchIterable
forEach
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach
-
Methods 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, sumByLong
-
Methods inherited from interface org.eclipse.collections.api.set.MutableSet
collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollectWith, toImmutableSet
-
Methods 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, 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, zipWithIndex
-
Methods inherited from interface java.util.Set
addAll, containsAll, isEmpty, removeAll, spliterator
-
-
-
-
Constructor Detail
-
UnifiedSetWithHashingStrategy
@Deprecated public 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
public UnifiedSetWithHashingStrategy(HashingStrategy<? super T> hashingStrategy)
-
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 Detail
-
newSet
public static <K> UnifiedSetWithHashingStrategy<K> newSet(HashingStrategy<? super K> hashingStrategy)
-
newSet
public static <K> UnifiedSetWithHashingStrategy<K> newSet(UnifiedSetWithHashingStrategy<K> set)
-
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
public HashingStrategy<? super T> hashingStrategy()
-
clear
public void clear()
-
add
public boolean add(T key)
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceSet<T>- Overrides:
addin classAbstractMutableCollection<T>
-
contains
public boolean contains(Object key)
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceRichIterable<T>- Specified by:
containsin interfaceSet<T>- Overrides:
containsin classAbstractRichIterable<T>
-
batchForEach
public void batchForEach(Procedure<? super T> procedure, int sectionIndex, int sectionCount)
- Specified by:
batchForEachin interfaceBatchIterable<T>
-
tap
public UnifiedSetWithHashingStrategy<T> tap(Procedure<? super T> procedure)
- 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
public void each(Procedure<? super T> procedure)
- Specified by:
eachin interfaceRichIterable<T>
-
forEachWith
public <P> void forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
- Specified by:
forEachWithin interfaceInternalIterable<T>- Overrides:
forEachWithin classAbstractRichIterable<T>
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Overrides:
forEachWithIndexin classAbstractRichIterable<T>
-
newEmpty
public UnifiedSetWithHashingStrategy<T> newEmpty()
- Specified by:
newEmptyin interfaceMutableCollection<T>- Specified by:
newEmptyin interfaceMutableSet<T>
-
newEmpty
public UnifiedSetWithHashingStrategy<T> newEmpty(int size)
- Specified by:
newEmptyin classAbstractUnifiedSet<T>
-
getFirst
public T getFirst()
- Specified by:
getFirstin interfaceRichIterable<T>
-
getLast
public T getLast()
- Specified by:
getLastin interfaceRichIterable<T>
-
select
public UnifiedSetWithHashingStrategy<T> select(Predicate<? super T> predicate)
- 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
public UnifiedSetWithHashingStrategy<T> reject(Predicate<? super T> predicate)
- 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
public PartitionMutableSet<T> partition(Predicate<? super T> predicate)
- 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
public <S> UnifiedSetWithHashingStrategy<S> selectInstancesOf(Class<S> clazz)
- 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 public LazyIterable<T> lazySelect(Predicate<? super T> predicate)
Deprecated.since 3.0. UseAbstractRichIterable.asLazy().select(Predicate)instead.
-
lazyReject
@Deprecated public LazyIterable<T> lazyReject(Predicate<? super T> predicate)
Deprecated.since 3.0. UseAbstractRichIterable.asLazy().reject(Predicate)instead.
-
lazyCollect
@Deprecated public <V> LazyIterable<V> lazyCollect(Function<? super T,? extends V> function)
Deprecated.since 3.0. UseAbstractRichIterable.asLazy().AbstractUnifiedSet.collect(Function)instead.
-
toImmutable
public ImmutableSet<T> toImmutable()
- Specified by:
toImmutablein interfaceMutableCollection<T>- Specified by:
toImmutablein interfaceMutableSet<T>- Specified by:
toImmutablein interfaceSetIterable<T>- Specified by:
toImmutablein interfaceUnsortedSetIterable<T>
-
with
public UnifiedSetWithHashingStrategy<T> with(T element)
- Specified by:
within interfaceMutableCollection<T>- Specified by:
within interfaceMutableSet<T>- Specified by:
within interfaceMutableSetIterable<T>
-
with
public UnifiedSetWithHashingStrategy<T> with(T element1, T element2)
-
with
public UnifiedSetWithHashingStrategy<T> with(T element1, T element2, T element3)
-
with
public UnifiedSetWithHashingStrategy<T> with(T... elements)
-
withAll
public UnifiedSetWithHashingStrategy<T> withAll(Iterable<? extends T> iterable)
- Specified by:
withAllin interfaceMutableCollection<T>- Specified by:
withAllin interfaceMutableSet<T>- Specified by:
withAllin interfaceMutableSetIterable<T>
-
without
public UnifiedSetWithHashingStrategy<T> without(T element)
- Specified by:
withoutin interfaceMutableCollection<T>- Specified by:
withoutin interfaceMutableSet<T>- Specified by:
withoutin interfaceMutableSetIterable<T>
-
withoutAll
public UnifiedSetWithHashingStrategy<T> withoutAll(Iterable<? extends T> elements)
- Specified by:
withoutAllin interfaceMutableCollection<T>- Specified by:
withoutAllin interfaceMutableSet<T>- Specified by:
withoutAllin interfaceMutableSetIterable<T>
-
addAllIterable
public boolean addAllIterable(Iterable<? extends T> iterable)
- Specified by:
addAllIterablein interfaceMutableCollection<T>- Overrides:
addAllIterablein classAbstractMutableCollection<T>
-
remove
public boolean remove(Object key)
- 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
public boolean equals(Object object)
-
hashCode
public int hashCode()
-
trimToSize
public boolean trimToSize()
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
retainAllIterable
public boolean retainAllIterable(Iterable<?> iterable)
- Specified by:
retainAllIterablein interfaceMutableCollection<T>- Overrides:
retainAllIterablein classAbstractMutableCollection<T>
-
clone
public UnifiedSetWithHashingStrategy<T> clone()
- Specified by:
clonein interfaceMutableSet<T>- Specified by:
clonein classAbstractUnifiedSet<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>- Specified by:
toArrayin interfaceSet<T>- Overrides:
toArrayin classAbstractRichIterable<T>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>- Specified by:
toArrayin interfaceSet<T>- Overrides:
toArrayin classAbstractRichIterable<T>
-
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>
-
removeFromPool
public T removeFromPool(T key)
- Specified by:
removeFromPoolin interfacePool<T>
-
asParallel
public ParallelUnsortedSetIterable<T> asParallel(ExecutorService executorService, int batchSize)
- Specified by:
asParallelin interfaceSetIterable<T>- Specified by:
asParallelin interfaceUnsortedSetIterable<T>
-
-