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) |
equalsappendString, appendString, asLazy, average, containsAll, containsAll, isEmpty, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, notEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringasLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic 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()
ShortSetSet.hashCode().hashCode in interface ShortSethashCode in class AbstractShortSetpublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic boolean add(short element)
add in interface MutableShortCollectionpublic boolean addAll(short... source)
addAll in interface MutableShortCollectionpublic boolean addAll(ShortIterable source)
addAll in interface MutableShortCollectionpublic boolean remove(short value)
remove in interface MutableShortCollectionpublic boolean removeAll(ShortIterable source)
removeAll in interface MutableShortCollectionpublic boolean removeAll(short... source)
removeAll in interface MutableShortCollectionpublic boolean retainAll(ShortIterable source)
retainAll in interface MutableShortCollectionCollection.retainAll(Collection)public boolean retainAll(short... source)
retainAll in interface MutableShortCollectionCollection.retainAll(Collection)public void clear()
clear in interface MutableShortCollectionpublic ShortHashSet with(short element)
with in interface MutableShortCollectionwith in interface MutableShortSetpublic ShortHashSet without(short element)
without in interface MutableShortCollectionwithout in interface MutableShortSetpublic ShortHashSet withAll(ShortIterable elements)
withAll in interface MutableShortCollectionwithAll in interface MutableShortSetpublic ShortHashSet withoutAll(ShortIterable elements)
withoutAll in interface MutableShortCollectionwithoutAll in interface MutableShortSetpublic MutableShortSet asUnmodifiable()
asUnmodifiable in interface MutableShortCollectionasUnmodifiable in interface MutableShortSetpublic MutableShortSet asSynchronized()
asSynchronized in interface MutableShortCollectionasSynchronized in interface MutableShortSetpublic ImmutableShortSet toImmutable()
MutableShortSettoImmutable in interface MutableShortCollectiontoImmutable in interface MutableShortSettoImmutable in interface ShortSetpublic MutableShortIterator shortIterator()
shortIterator in interface MutableShortCollectionshortIterator in interface ShortIterablepublic short[] toArray()
toArray in interface ShortIterablepublic boolean contains(short value)
contains in interface ShortIterablepublic void forEach(ShortProcedure procedure)
forEach in interface ShortIterablepublic void each(ShortProcedure procedure)
each in interface ShortIterablepublic ShortHashSet select(ShortPredicate predicate)
select in interface MutableShortCollectionselect in interface MutableShortSetselect in interface ShortSetselect in interface ShortIterablepublic MutableShortSet reject(ShortPredicate predicate)
reject in interface MutableShortCollectionreject in interface MutableShortSetreject in interface ShortSetreject in interface ShortIterablepublic <V> MutableSet<V> collect(ShortToObjectFunction<? extends V> function)
collect in interface MutableShortCollectioncollect in interface MutableShortSetcollect in interface ShortSetcollect in interface ShortIterablepublic short detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone in interface ShortIterablepublic int count(ShortPredicate predicate)
count in interface ShortIterablepublic boolean anySatisfy(ShortPredicate predicate)
anySatisfy in interface ShortIterablepublic boolean allSatisfy(ShortPredicate predicate)
allSatisfy in interface ShortIterablepublic boolean noneSatisfy(ShortPredicate predicate)
noneSatisfy in interface ShortIterablepublic long sum()
sum in interface ShortIterablepublic short max()
max in interface ShortIterablepublic short min()
min in interface ShortIterablepublic ShortSet freeze()
MutableShortSetfreeze in interface MutableShortSetfreeze in interface ShortSetpublic 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,
ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface ShortIterablepublic void compact()
Copyright © 2004–2016. All rights reserved.