public final class IntHashSet extends AbstractIntSet implements MutableIntSet, Externalizable
Constructor and Description |
---|
IntHashSet() |
IntHashSet(int... elements) |
IntHashSet(int initialCapacity) |
IntHashSet(IntHashSet set) |
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)
Prints a string representation of this collection onto the given
Appendable . |
MutableIntSet |
asSynchronized() |
MutableIntSet |
asUnmodifiable() |
void |
clear() |
<V> MutableSet<V> |
collect(IntToObjectFunction<? extends V> function) |
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) |
void |
forEach(IntProcedure procedure) |
IntSet |
freeze()
Returns a frozen copy of this set.
|
int |
hashCode()
Follows the same general contract as
Set.hashCode() . |
<T> T |
injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function) |
MutableIntIterator |
intIterator() |
int |
max() |
int |
min() |
static IntHashSet |
newSet(IntIterable source) |
static IntHashSet |
newSetWith(int... source) |
boolean |
noneSatisfy(IntPredicate predicate) |
void |
readExternal(ObjectInput in) |
MutableIntSet |
reject(IntPredicate predicate) |
boolean |
remove(int value) |
boolean |
removeAll(int... source) |
boolean |
removeAll(IntIterable source) |
boolean |
retainAll(int... source) |
boolean |
retainAll(IntIterable source) |
IntHashSet |
select(IntPredicate predicate) |
int |
size()
Returns the number of items in this iterable.
|
long |
sum() |
int[] |
toArray() |
ImmutableIntSet |
toImmutable()
Returns an immutable copy of this set.
|
IntHashSet |
with(int element) |
IntHashSet |
withAll(IntIterable elements) |
IntHashSet |
without(int element) |
IntHashSet |
withoutAll(IntIterable elements) |
void |
writeExternal(ObjectOutput out) |
equals
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
public IntHashSet()
public IntHashSet(int initialCapacity)
public IntHashSet(int... elements)
public IntHashSet(IntHashSet set)
public static IntHashSet newSet(IntIterable source)
public static IntHashSet newSetWith(int... source)
public int hashCode()
IntSet
Set.hashCode()
.hashCode
in interface IntSet
hashCode
in class AbstractIntSet
public int size()
PrimitiveIterable
size
in interface PrimitiveIterable
public void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String, String, String)
.appendString
in interface PrimitiveIterable
public boolean add(int element)
add
in interface MutableIntCollection
public boolean addAll(int... source)
addAll
in interface MutableIntCollection
public boolean addAll(IntIterable source)
addAll
in interface MutableIntCollection
public boolean remove(int value)
remove
in interface MutableIntCollection
public boolean removeAll(IntIterable source)
removeAll
in interface MutableIntCollection
public boolean removeAll(int... source)
removeAll
in interface MutableIntCollection
public boolean retainAll(IntIterable source)
retainAll
in interface MutableIntCollection
Collection.retainAll(Collection)
public boolean retainAll(int... source)
retainAll
in interface MutableIntCollection
Collection.retainAll(Collection)
public void clear()
clear
in interface MutableIntCollection
public IntHashSet with(int element)
with
in interface MutableIntCollection
with
in interface MutableIntSet
public IntHashSet without(int element)
without
in interface MutableIntCollection
without
in interface MutableIntSet
public IntHashSet withAll(IntIterable elements)
withAll
in interface MutableIntCollection
withAll
in interface MutableIntSet
public IntHashSet withoutAll(IntIterable elements)
withoutAll
in interface MutableIntCollection
withoutAll
in interface MutableIntSet
public MutableIntSet asUnmodifiable()
asUnmodifiable
in interface MutableIntCollection
asUnmodifiable
in interface MutableIntSet
public MutableIntSet asSynchronized()
asSynchronized
in interface MutableIntCollection
asSynchronized
in interface MutableIntSet
public ImmutableIntSet toImmutable()
MutableIntSet
toImmutable
in interface MutableIntCollection
toImmutable
in interface IntSet
toImmutable
in interface MutableIntSet
public MutableIntIterator intIterator()
intIterator
in interface MutableIntCollection
intIterator
in interface IntIterable
public int[] toArray()
toArray
in interface IntIterable
public boolean contains(int value)
contains
in interface IntIterable
public void forEach(IntProcedure procedure)
forEach
in interface IntIterable
public void each(IntProcedure procedure)
each
in interface IntIterable
public IntHashSet select(IntPredicate predicate)
select
in interface MutableIntCollection
select
in interface IntIterable
select
in interface IntSet
select
in interface MutableIntSet
public MutableIntSet reject(IntPredicate predicate)
reject
in interface MutableIntCollection
reject
in interface IntIterable
reject
in interface IntSet
reject
in interface MutableIntSet
public <V> MutableSet<V> collect(IntToObjectFunction<? extends V> function)
collect
in interface MutableIntCollection
collect
in interface IntIterable
collect
in interface IntSet
collect
in interface MutableIntSet
public int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone
in interface IntIterable
public int count(IntPredicate predicate)
count
in interface IntIterable
public boolean anySatisfy(IntPredicate predicate)
anySatisfy
in interface IntIterable
public boolean allSatisfy(IntPredicate predicate)
allSatisfy
in interface IntIterable
public boolean noneSatisfy(IntPredicate predicate)
noneSatisfy
in interface IntIterable
public long sum()
sum
in interface IntIterable
public int max()
max
in interface IntIterable
public int min()
min
in interface IntIterable
public IntSet freeze()
MutableIntSet
freeze
in interface IntSet
freeze
in interface MutableIntSet
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
IOException
public <T> T injectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto
in interface IntIterable
public void compact()
Copyright © 2004–2016. All rights reserved.