public class IntHashSet extends AbstractIntSet implements MutableIntSet, Externalizable
| Constructor and Description |
|---|
IntHashSet() |
IntHashSet(int... elements) |
IntHashSet(int initialCapacity) |
IntHashSet(IntHashSet set) |
IntHashSet(IntIterable elements) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int element) |
boolean |
addAll(int... source) |
boolean |
addAll(IntIterable source) |
boolean |
allSatisfy(IntPredicate predicate) |
boolean |
anySatisfy(IntPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
MutableIntSet |
asSynchronized() |
MutableIntSet |
asUnmodifiable() |
RichIterable<IntIterable> |
chunk(int size) |
void |
clear() |
<V> MutableSet<V> |
collect(IntToObjectFunction<? extends V> function) |
<V,R extends Collection<V>> |
collect(IntToObjectFunction<? extends V> function,
R target) |
void |
compact()
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
contains(int value) |
int |
count(IntPredicate predicate) |
int |
detectIfNone(IntPredicate predicate,
int ifNone) |
void |
each(IntProcedure procedure) |
IntSet |
freeze() |
int |
hashCode() |
<T> T |
injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function) |
MutableIntIterator |
intIterator() |
int |
max() |
int |
min() |
IntHashSet |
newEmpty()
Creates a new empty IntHashSet.
|
static IntHashSet |
newSet(IntIterable source) |
static IntHashSet |
newSetWith(int... source) |
void |
readExternal(ObjectInput in) |
IntHashSet |
reject(IntPredicate predicate) |
<R extends MutableIntCollection> |
reject(IntPredicate predicate,
R target) |
boolean |
remove(int value) |
boolean |
removeAll(int... source) |
boolean |
removeAll(IntIterable source) |
boolean |
retainAll(int... source) |
boolean |
retainAll(IntIterable source) |
IntHashSet |
select(IntPredicate predicate) |
<R extends MutableIntCollection> |
select(IntPredicate predicate,
R target) |
int |
size() |
long |
sum() |
int[] |
toArray() |
int[] |
toArray(int[] array) |
ImmutableIntSet |
toImmutable() |
IntHashSet |
with(int element) |
IntHashSet |
withAll(IntIterable elements) |
IntHashSet |
without(int element) |
IntHashSet |
withoutAll(IntIterable elements) |
void |
writeExternal(ObjectOutput out) |
cartesianProduct, equalsasLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringdifference, intersect, symmetricDifference, tap, unionremoveIfcartesianProduct, equals, isProperSubsetOf, isSubsetOfasLazy, 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, toSortedListByappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic IntHashSet()
public IntHashSet(int initialCapacity)
public IntHashSet(int... elements)
public IntHashSet(IntIterable elements)
public IntHashSet(IntHashSet set)
public static IntHashSet newSet(IntIterable source)
public static IntHashSet newSetWith(int... source)
public int hashCode()
hashCode in interface IntSethashCode in class AbstractIntSetpublic int size()
size in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic boolean add(int element)
add in interface MutableIntCollectionpublic boolean addAll(int... source)
addAll in interface MutableIntCollectionpublic boolean addAll(IntIterable source)
addAll in interface MutableIntCollectionpublic boolean remove(int value)
remove in interface MutableIntCollectionpublic boolean removeAll(IntIterable source)
removeAll in interface MutableIntCollectionpublic boolean removeAll(int... source)
removeAll in interface MutableIntCollectionpublic boolean retainAll(IntIterable source)
retainAll in interface MutableIntCollectionpublic boolean retainAll(int... source)
retainAll in interface MutableIntCollectionpublic void clear()
clear in interface MutableIntCollectionpublic IntHashSet with(int element)
with in interface MutableIntCollectionwith in interface MutableIntSetpublic IntHashSet without(int element)
without in interface MutableIntCollectionwithout in interface MutableIntSetpublic IntHashSet withAll(IntIterable elements)
withAll in interface MutableIntCollectionwithAll in interface MutableIntSetpublic IntHashSet withoutAll(IntIterable elements)
withoutAll in interface MutableIntCollectionwithoutAll in interface MutableIntSetpublic MutableIntSet asUnmodifiable()
asUnmodifiable in interface MutableIntCollectionasUnmodifiable in interface MutableIntSetpublic MutableIntSet asSynchronized()
asSynchronized in interface MutableIntCollectionasSynchronized in interface MutableIntSetpublic ImmutableIntSet toImmutable()
toImmutable in interface MutableIntCollectiontoImmutable in interface IntSettoImmutable in interface MutableIntSetpublic MutableIntIterator intIterator()
intIterator in interface MutableIntCollectionintIterator in interface IntIterablepublic int[] toArray()
toArray in interface IntIterablepublic int[] toArray(int[] array)
toArray in interface IntIterablepublic boolean contains(int value)
contains in interface IntIterablepublic void each(IntProcedure procedure)
each in interface IntIterablepublic IntHashSet select(IntPredicate predicate)
select in interface MutableIntCollectionselect in interface IntIterableselect in interface IntSetselect in interface MutableIntSetpublic <R extends MutableIntCollection> R select(IntPredicate predicate, R target)
select in interface IntIterablepublic IntHashSet reject(IntPredicate predicate)
reject in interface MutableIntCollectionreject in interface IntIterablereject in interface IntSetreject in interface MutableIntSetpublic <R extends MutableIntCollection> R reject(IntPredicate predicate, R target)
reject in interface IntIterablepublic <V> MutableSet<V> collect(IntToObjectFunction<? extends V> function)
collect in interface MutableIntCollectioncollect in interface IntIterablecollect in interface IntSetcollect in interface MutableIntSetpublic <V,R extends Collection<V>> R collect(IntToObjectFunction<? extends V> function, R target)
collect in interface IntIterablepublic int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone in interface IntIterablepublic int count(IntPredicate predicate)
count in interface IntIterablepublic boolean anySatisfy(IntPredicate predicate)
anySatisfy in interface IntIterablepublic boolean allSatisfy(IntPredicate predicate)
allSatisfy in interface IntIterablepublic long sum()
sum in interface IntIterablepublic int max()
max in interface IntIterablepublic int min()
min in interface IntIterablepublic IntSet freeze()
freeze in interface IntSetfreeze in interface MutableIntSetpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic <T> T injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto in interface IntIterablepublic RichIterable<IntIterable> chunk(int size)
chunk in interface IntIterablepublic IntHashSet newEmpty()
newEmpty in interface MutableIntCollectionnewEmpty in interface MutableIntSetpublic void compact()
Copyright © 2004–2022. All rights reserved.