Class IntHashSet
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.set.primitive.AbstractIntSet
org.eclipse.collections.impl.set.mutable.primitive.IntHashSet
- All Implemented Interfaces:
Externalizable,Serializable,MutableIntCollection,IntIterable,PrimitiveIterable,IntSet,MutableIntSet
This file was automatically generated from template file primitiveHashSet.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIntHashSet(int initialCapacity) IntHashSet(int... elements) IntHashSet(IntIterable elements) IntHashSet(IntHashSet set) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int element) booleanaddAll(int... source) booleanaddAll(IntIterable source) booleanallSatisfy(IntPredicate predicate) booleananySatisfy(IntPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) boxed()chunk(int size) voidclear()<V> MutableSet<V>collect(IntToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(IntToObjectFunction<? extends V> function, R target) voidcompact()Deprecated.booleancontains(int value) intcount(IntPredicate predicate) intdetectIfNone(IntPredicate predicate, int ifNone) voideach(IntProcedure procedure) freeze()inthashCode()<T> TinjectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function) intmax()intmin()newEmpty()Creates a new empty IntHashSet.static IntHashSetnewSet(IntIterable source) static IntHashSetnewSetWith(int... source) voidreject(IntPredicate predicate) <R extends MutableIntCollection>
Rreject(IntPredicate predicate, R target) booleanremove(int value) booleanremoveAll(int... source) booleanremoveAll(IntIterable source) booleanretainAll(int... source) booleanretainAll(IntIterable source) select(IntPredicate predicate) <R extends MutableIntCollection>
Rselect(IntPredicate predicate, R target) intsize()longsum()int[]toArray()int[]toArray(int[] array) booleanwith(int element) withAll(IntIterable elements) without(int element) withoutAll(IntIterable elements) voidMethods inherited from class org.eclipse.collections.impl.set.primitive.AbstractIntSet
cartesianProduct, equalsMethods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.IntIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.set.primitive.IntSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tapMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableIntCollection
removeIfMethods inherited from interface org.eclipse.collections.api.set.primitive.MutableIntSet
difference, intersect, symmetricDifference, tap, unionMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
IntHashSet
public IntHashSet() -
IntHashSet
public IntHashSet(int initialCapacity) -
IntHashSet
public IntHashSet(int... elements) -
IntHashSet
-
IntHashSet
-
-
Method Details
-
boxed
- Specified by:
boxedin interfaceMutableIntSet
-
newSet
-
newSetWith
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceIntSet- Specified by:
hashCodein classAbstractIntSet
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
add
public boolean add(int element) - Specified by:
addin interfaceMutableIntCollection
-
addAll
public boolean addAll(int... source) - Specified by:
addAllin interfaceMutableIntCollection
-
addAll
- Specified by:
addAllin interfaceMutableIntCollection
-
remove
public boolean remove(int value) - Specified by:
removein interfaceMutableIntCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableIntCollection
-
removeAll
public boolean removeAll(int... source) - Specified by:
removeAllin interfaceMutableIntCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableIntCollection
-
retainAll
public boolean retainAll(int... source) - Specified by:
retainAllin interfaceMutableIntCollection
-
clear
public void clear()- Specified by:
clearin interfaceMutableIntCollection
-
with
- Specified by:
within interfaceMutableIntCollection- Specified by:
within interfaceMutableIntSet
-
without
- Specified by:
withoutin interfaceMutableIntCollection- Specified by:
withoutin interfaceMutableIntSet
-
withAll
- Specified by:
withAllin interfaceMutableIntCollection- Specified by:
withAllin interfaceMutableIntSet
-
withoutAll
- Specified by:
withoutAllin interfaceMutableIntCollection- Specified by:
withoutAllin interfaceMutableIntSet
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableIntCollection- Specified by:
asUnmodifiablein interfaceMutableIntSet
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableIntCollection- Specified by:
asSynchronizedin interfaceMutableIntSet
-
toImmutable
- Specified by:
toImmutablein interfaceIntSet- Specified by:
toImmutablein interfaceMutableIntCollection- Specified by:
toImmutablein interfaceMutableIntSet
-
intIterator
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntCollection
-
toArray
public int[] toArray()- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] array) - Specified by:
toArrayin interfaceIntIterable
-
contains
public boolean contains(int value) - Specified by:
containsin interfaceIntIterable
-
each
- Specified by:
eachin interfaceIntIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntSet- Specified by:
selectin interfaceMutableIntCollection- Specified by:
selectin interfaceMutableIntSet
-
select
- Specified by:
selectin interfaceIntIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntSet- Specified by:
rejectin interfaceMutableIntCollection- Specified by:
rejectin interfaceMutableIntSet
-
reject
- Specified by:
rejectin interfaceIntIterable- Since:
- 8.1.
-
collect
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntSet- Specified by:
collectin interfaceMutableIntCollection- Specified by:
collectin interfaceMutableIntSet
-
collect
- Specified by:
collectin interfaceIntIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceIntIterable
-
count
- Specified by:
countin interfaceIntIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceIntIterable
-
sum
public long sum()- Specified by:
sumin interfaceIntIterable
-
max
public int max()- Specified by:
maxin interfaceIntIterable
-
min
public int min()- Specified by:
minin interfaceIntIterable
-
freeze
- Specified by:
freezein interfaceIntSet- Specified by:
freezein interfaceMutableIntSet
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
chunk
- Specified by:
chunkin interfaceIntIterable
-
newEmpty
Creates a new empty IntHashSet.- Specified by:
newEmptyin interfaceMutableIntCollection- Specified by:
newEmptyin interfaceMutableIntSet- Since:
- 9.2.
-
trimToSize
public boolean trimToSize()- Since:
- 12.0
-
compact
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
trimToSize()instead