public final class ShortHashSet extends AbstractShortSet implements MutableShortSet, Externalizable
Constructor and Description |
---|
ShortHashSet() |
ShortHashSet(int initialCapacity) |
ShortHashSet(short... elements) |
ShortHashSet(ShortHashSet set) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(short element) |
boolean |
addAll(short... source) |
boolean |
addAll(ShortIterable source) |
boolean |
allSatisfy(ShortPredicate predicate) |
boolean |
anySatisfy(ShortPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable . |
MutableShortSet |
asSynchronized() |
MutableShortSet |
asUnmodifiable() |
void |
clear() |
<V> MutableSet<V> |
collect(ShortToObjectFunction<? 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(short value) |
int |
count(ShortPredicate predicate) |
short |
detectIfNone(ShortPredicate predicate,
short ifNone) |
void |
each(ShortProcedure procedure) |
void |
forEach(ShortProcedure procedure) |
ShortSet |
freeze()
Returns a frozen copy of this set.
|
int |
hashCode()
Follows the same general contract as
Set.hashCode() . |
<T> T |
injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function) |
short |
max() |
short |
min() |
static ShortHashSet |
newSet(ShortIterable source) |
static ShortHashSet |
newSetWith(short... source) |
boolean |
noneSatisfy(ShortPredicate predicate) |
void |
readExternal(ObjectInput in) |
MutableShortSet |
reject(ShortPredicate predicate) |
boolean |
remove(short value) |
boolean |
removeAll(short... source) |
boolean |
removeAll(ShortIterable source) |
boolean |
retainAll(short... source) |
boolean |
retainAll(ShortIterable source) |
ShortHashSet |
select(ShortPredicate predicate) |
MutableShortIterator |
shortIterator() |
int |
size()
Returns the number of items in this iterable.
|
long |
sum() |
short[] |
toArray() |
ImmutableShortSet |
toImmutable()
Returns an immutable copy of this set.
|
ShortHashSet |
with(short element) |
ShortHashSet |
withAll(ShortIterable elements) |
ShortHashSet |
without(short element) |
ShortHashSet |
withoutAll(ShortIterable elements) |
void |
writeExternal(ObjectOutput out) |
equals
appendString, appendString, asLazy, average, containsAll, containsAll, isEmpty, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, notEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
public ShortHashSet()
public ShortHashSet(int initialCapacity)
public ShortHashSet(short... elements)
public ShortHashSet(ShortHashSet set)
public static ShortHashSet newSet(ShortIterable source)
public static ShortHashSet newSetWith(short... source)
public int hashCode()
ShortSet
Set.hashCode()
.hashCode
in interface ShortSet
hashCode
in class AbstractShortSet
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(short element)
add
in interface MutableShortCollection
public boolean addAll(short... source)
addAll
in interface MutableShortCollection
public boolean addAll(ShortIterable source)
addAll
in interface MutableShortCollection
public boolean remove(short value)
remove
in interface MutableShortCollection
public boolean removeAll(ShortIterable source)
removeAll
in interface MutableShortCollection
public boolean removeAll(short... source)
removeAll
in interface MutableShortCollection
public boolean retainAll(ShortIterable source)
retainAll
in interface MutableShortCollection
Collection.retainAll(Collection)
public boolean retainAll(short... source)
retainAll
in interface MutableShortCollection
Collection.retainAll(Collection)
public void clear()
clear
in interface MutableShortCollection
public ShortHashSet with(short element)
with
in interface MutableShortCollection
with
in interface MutableShortSet
public ShortHashSet without(short element)
without
in interface MutableShortCollection
without
in interface MutableShortSet
public ShortHashSet withAll(ShortIterable elements)
withAll
in interface MutableShortCollection
withAll
in interface MutableShortSet
public ShortHashSet withoutAll(ShortIterable elements)
withoutAll
in interface MutableShortCollection
withoutAll
in interface MutableShortSet
public MutableShortSet asUnmodifiable()
asUnmodifiable
in interface MutableShortCollection
asUnmodifiable
in interface MutableShortSet
public MutableShortSet asSynchronized()
asSynchronized
in interface MutableShortCollection
asSynchronized
in interface MutableShortSet
public ImmutableShortSet toImmutable()
MutableShortSet
toImmutable
in interface MutableShortCollection
toImmutable
in interface MutableShortSet
toImmutable
in interface ShortSet
public MutableShortIterator shortIterator()
shortIterator
in interface MutableShortCollection
shortIterator
in interface ShortIterable
public short[] toArray()
toArray
in interface ShortIterable
public boolean contains(short value)
contains
in interface ShortIterable
public void forEach(ShortProcedure procedure)
forEach
in interface ShortIterable
public void each(ShortProcedure procedure)
each
in interface ShortIterable
public ShortHashSet select(ShortPredicate predicate)
select
in interface MutableShortCollection
select
in interface MutableShortSet
select
in interface ShortSet
select
in interface ShortIterable
public MutableShortSet reject(ShortPredicate predicate)
reject
in interface MutableShortCollection
reject
in interface MutableShortSet
reject
in interface ShortSet
reject
in interface ShortIterable
public <V> MutableSet<V> collect(ShortToObjectFunction<? extends V> function)
collect
in interface MutableShortCollection
collect
in interface MutableShortSet
collect
in interface ShortSet
collect
in interface ShortIterable
public short detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone
in interface ShortIterable
public int count(ShortPredicate predicate)
count
in interface ShortIterable
public boolean anySatisfy(ShortPredicate predicate)
anySatisfy
in interface ShortIterable
public boolean allSatisfy(ShortPredicate predicate)
allSatisfy
in interface ShortIterable
public boolean noneSatisfy(ShortPredicate predicate)
noneSatisfy
in interface ShortIterable
public long sum()
sum
in interface ShortIterable
public short max()
max
in interface ShortIterable
public short min()
min
in interface ShortIterable
public ShortSet freeze()
MutableShortSet
freeze
in interface MutableShortSet
freeze
in interface ShortSet
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, ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto
in interface ShortIterable
public void compact()
Copyright © 2004–2016. All rights reserved.