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:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceSet<T>
- Overrides:
add
in classAbstractMutableCollection<T>
-
contains
public boolean contains(Object key)
- Specified by:
contains
in interfaceCollection<T>
- Specified by:
contains
in interfaceRichIterable<T>
- Specified by:
contains
in interfaceSet<T>
- Overrides:
contains
in classAbstractRichIterable<T>
-
batchForEach
public void batchForEach(Procedure<? super T> procedure, int sectionIndex, int sectionCount)
- Specified by:
batchForEach
in interfaceBatchIterable<T>
-
tap
public UnifiedSetWithHashingStrategy<T> tap(Procedure<? super T> procedure)
- Specified by:
tap
in interfaceMutableCollection<T>
- Specified by:
tap
in interfaceMutableSet<T>
- Specified by:
tap
in interfaceMutableSetIterable<T>
- Specified by:
tap
in interfaceRichIterable<T>
- Specified by:
tap
in interfaceSetIterable<T>
- Specified by:
tap
in interfaceUnsortedSetIterable<T>
-
each
public void each(Procedure<? super T> procedure)
- Specified by:
each
in interfaceRichIterable<T>
-
forEachWith
public <P> void forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
- Specified by:
forEachWith
in interfaceInternalIterable<T>
- Overrides:
forEachWith
in classAbstractRichIterable<T>
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithIndex
in interfaceInternalIterable<T>
- Overrides:
forEachWithIndex
in classAbstractRichIterable<T>
-
newEmpty
public UnifiedSetWithHashingStrategy<T> newEmpty()
- Specified by:
newEmpty
in interfaceMutableCollection<T>
- Specified by:
newEmpty
in interfaceMutableSet<T>
-
newEmpty
public UnifiedSetWithHashingStrategy<T> newEmpty(int size)
- Specified by:
newEmpty
in classAbstractUnifiedSet<T>
-
getFirst
public T getFirst()
- Specified by:
getFirst
in interfaceRichIterable<T>
-
getLast
public T getLast()
- Specified by:
getLast
in interfaceRichIterable<T>
-
select
public UnifiedSetWithHashingStrategy<T> select(Predicate<? super T> predicate)
- Specified by:
select
in interfaceMutableCollection<T>
- Specified by:
select
in interfaceMutableSet<T>
- Specified by:
select
in interfaceMutableSetIterable<T>
- Specified by:
select
in interfaceRichIterable<T>
- Specified by:
select
in interfaceSetIterable<T>
- Specified by:
select
in interfaceUnsortedSetIterable<T>
-
selectWith
public <P> UnifiedSetWithHashingStrategy<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectWith
in interfaceMutableCollection<T>
- Specified by:
selectWith
in interfaceMutableSet<T>
- Specified by:
selectWith
in interfaceMutableSetIterable<T>
- Specified by:
selectWith
in interfaceRichIterable<T>
- Specified by:
selectWith
in interfaceSetIterable<T>
- Specified by:
selectWith
in interfaceUnsortedSetIterable<T>
-
reject
public UnifiedSetWithHashingStrategy<T> reject(Predicate<? super T> predicate)
- Specified by:
reject
in interfaceMutableCollection<T>
- Specified by:
reject
in interfaceMutableSet<T>
- Specified by:
reject
in interfaceMutableSetIterable<T>
- Specified by:
reject
in interfaceRichIterable<T>
- Specified by:
reject
in interfaceSetIterable<T>
- Specified by:
reject
in interfaceUnsortedSetIterable<T>
-
rejectWith
public <P> UnifiedSetWithHashingStrategy<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
rejectWith
in interfaceMutableCollection<T>
- Specified by:
rejectWith
in interfaceMutableSet<T>
- Specified by:
rejectWith
in interfaceMutableSetIterable<T>
- Specified by:
rejectWith
in interfaceRichIterable<T>
- Specified by:
rejectWith
in interfaceSetIterable<T>
- Specified by:
rejectWith
in interfaceUnsortedSetIterable<T>
-
selectAndRejectWith
public <P> Twin<MutableList<T>> selectAndRejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectAndRejectWith
in interfaceMutableCollection<T>
- Overrides:
selectAndRejectWith
in classAbstractMutableCollection<T>
-
partition
public PartitionMutableSet<T> partition(Predicate<? super T> predicate)
- Specified by:
partition
in interfaceMutableCollection<T>
- Specified by:
partition
in interfaceMutableSet<T>
- Specified by:
partition
in interfaceMutableSetIterable<T>
- Specified by:
partition
in interfaceRichIterable<T>
- Specified by:
partition
in interfaceSetIterable<T>
-
partitionWith
public <P> PartitionMutableSet<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
partitionWith
in interfaceMutableCollection<T>
- Specified by:
partitionWith
in interfaceMutableSet<T>
- Specified by:
partitionWith
in interfaceMutableSetIterable<T>
- Specified by:
partitionWith
in interfaceRichIterable<T>
- Specified by:
partitionWith
in interfaceSetIterable<T>
-
selectInstancesOf
public <S> UnifiedSetWithHashingStrategy<S> selectInstancesOf(Class<S> clazz)
- Specified by:
selectInstancesOf
in interfaceMutableCollection<T>
- Specified by:
selectInstancesOf
in interfaceMutableSet<T>
- Specified by:
selectInstancesOf
in interfaceMutableSetIterable<T>
- Specified by:
selectInstancesOf
in interfaceRichIterable<T>
- Specified by:
selectInstancesOf
in interfaceSetIterable<T>
- Specified by:
selectInstancesOf
in 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:
toImmutable
in interfaceMutableCollection<T>
- Specified by:
toImmutable
in interfaceMutableSet<T>
- Specified by:
toImmutable
in interfaceSetIterable<T>
- Specified by:
toImmutable
in interfaceUnsortedSetIterable<T>
-
with
public UnifiedSetWithHashingStrategy<T> with(T element)
- Specified by:
with
in interfaceMutableCollection<T>
- Specified by:
with
in interfaceMutableSet<T>
- Specified by:
with
in 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:
withAll
in interfaceMutableCollection<T>
- Specified by:
withAll
in interfaceMutableSet<T>
- Specified by:
withAll
in interfaceMutableSetIterable<T>
-
without
public UnifiedSetWithHashingStrategy<T> without(T element)
- Specified by:
without
in interfaceMutableCollection<T>
- Specified by:
without
in interfaceMutableSet<T>
- Specified by:
without
in interfaceMutableSetIterable<T>
-
withoutAll
public UnifiedSetWithHashingStrategy<T> withoutAll(Iterable<? extends T> elements)
- Specified by:
withoutAll
in interfaceMutableCollection<T>
- Specified by:
withoutAll
in interfaceMutableSet<T>
- Specified by:
withoutAll
in interfaceMutableSetIterable<T>
-
addAllIterable
public boolean addAllIterable(Iterable<? extends T> iterable)
- Specified by:
addAllIterable
in interfaceMutableCollection<T>
- Overrides:
addAllIterable
in classAbstractMutableCollection<T>
-
remove
public boolean remove(Object key)
- Specified by:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceSet<T>
- Overrides:
remove
in classAbstractMutableCollection<T>
-
size
public int size()
- Specified by:
size
in interfaceBatchIterable<T>
- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfacePool<T>
- Specified by:
size
in interfaceRichIterable<T>
- Specified by:
size
in 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:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
retainAllIterable
public boolean retainAllIterable(Iterable<?> iterable)
- Specified by:
retainAllIterable
in interfaceMutableCollection<T>
- Overrides:
retainAllIterable
in classAbstractMutableCollection<T>
-
clone
public UnifiedSetWithHashingStrategy<T> clone()
- Specified by:
clone
in interfaceMutableSet<T>
- Specified by:
clone
in classAbstractUnifiedSet<T>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceRichIterable<T>
- Specified by:
toArray
in interfaceSet<T>
- Overrides:
toArray
in classAbstractRichIterable<T>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceRichIterable<T>
- Specified by:
toArray
in interfaceSet<T>
- Overrides:
toArray
in classAbstractRichIterable<T>
-
groupBy
public <V> UnifiedSetWithHashingStrategyMultimap<V,T> groupBy(Function<? super T,? extends V> function)
- Specified by:
groupBy
in interfaceMutableCollection<T>
- Specified by:
groupBy
in interfaceMutableSet<T>
- Specified by:
groupBy
in interfaceMutableSetIterable<T>
- Specified by:
groupBy
in interfaceRichIterable<T>
- Specified by:
groupBy
in interfaceUnsortedSetIterable<T>
-
groupByEach
public <V> UnifiedSetWithHashingStrategyMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
groupByEach
in interfaceMutableCollection<T>
- Specified by:
groupByEach
in interfaceMutableSet<T>
- Specified by:
groupByEach
in interfaceMutableSetIterable<T>
- Specified by:
groupByEach
in interfaceRichIterable<T>
- Specified by:
groupByEach
in interfaceUnsortedSetIterable<T>
-
removeFromPool
public T removeFromPool(T key)
- Specified by:
removeFromPool
in interfacePool<T>
-
asParallel
public ParallelUnsortedSetIterable<T> asParallel(ExecutorService executorService, int batchSize)
- Specified by:
asParallel
in interfaceSetIterable<T>
- Specified by:
asParallel
in interfaceUnsortedSetIterable<T>
-
-