public class IntShortHashMap extends Object implements MutableIntShortMap, Externalizable
| Constructor and Description |
|---|
IntShortHashMap() |
IntShortHashMap(int initialCapacity) |
IntShortHashMap(IntShortMap map) |
| Modifier and Type | Method and Description |
|---|---|
short |
addToValue(int key,
short toBeAdded) |
boolean |
allSatisfy(ShortPredicate predicate) |
boolean |
anySatisfy(ShortPredicate predicate) |
void |
appendString(Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyShortIterable |
asLazy() |
MutableIntShortMap |
asSynchronized() |
MutableIntShortMap |
asUnmodifiable() |
double |
average() |
void |
clear() |
<V> MutableCollection<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) |
boolean |
containsAll(short... source) |
boolean |
containsAll(ShortIterable source) |
boolean |
containsKey(int key) |
boolean |
containsValue(short value) |
int |
count(ShortPredicate predicate) |
short |
detectIfNone(ShortPredicate predicate,
short value) |
boolean |
equals(Object obj)
Follows the same general contract as
Map.equals(Object). |
void |
forEach(ShortProcedure procedure) |
void |
forEachKey(IntProcedure procedure) |
void |
forEachKeyValue(IntShortProcedure procedure) |
void |
forEachValue(ShortProcedure procedure) |
short |
get(int key) |
short |
getIfAbsent(int key,
short ifAbsent) |
short |
getIfAbsentPut(int key,
short value) |
short |
getIfAbsentPut(int key,
ShortFunction0 function) |
<P> short |
getIfAbsentPutWith(int key,
ShortFunction<? super P> function,
P parameter) |
short |
getIfAbsentPutWithKey(int key,
IntToShortFunction function) |
short |
getOrThrow(int key) |
int |
hashCode()
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
MutableIntSet |
keySet() |
LazyIntIterable |
keysView() |
RichIterable<IntShortPair> |
keyValuesView() |
String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
String |
makeString(String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
String |
makeString(String start,
String separator,
String end)
Returns a string representation of this collection.
|
short |
max() |
short |
maxIfEmpty(short defaultValue) |
double |
median() |
short |
min() |
short |
minIfEmpty(short defaultValue) |
static IntShortHashMap |
newWithKeysValues(int key1,
short value1) |
static IntShortHashMap |
newWithKeysValues(int key1,
short value1,
int key2,
short value2) |
static IntShortHashMap |
newWithKeysValues(int key1,
short value1,
int key2,
short value2,
int key3,
short value3) |
static IntShortHashMap |
newWithKeysValues(int key1,
short value1,
int key2,
short value2,
int key3,
short value3,
int key4,
short value4) |
boolean |
noneSatisfy(ShortPredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
void |
put(int key,
short value) |
void |
putAll(IntShortMap map) |
void |
readExternal(ObjectInput in) |
IntShortHashMap |
reject(IntShortPredicate predicate) |
MutableShortCollection |
reject(ShortPredicate predicate) |
void |
remove(int key) |
void |
removeKey(int key) |
short |
removeKeyIfAbsent(int key,
short value) |
IntShortHashMap |
select(IntShortPredicate predicate) |
MutableShortCollection |
select(ShortPredicate predicate) |
ShortIterator |
shortIterator() |
int |
size()
Returns the number of items in this iterable.
|
long |
sum() |
short[] |
toArray() |
MutableShortBag |
toBag() |
ImmutableIntShortMap |
toImmutable() |
MutableShortList |
toList() |
MutableShortSet |
toSet() |
short[] |
toSortedArray() |
MutableShortList |
toSortedList() |
String |
toString()
Returns a string representation of this IntShortMap.
|
short |
updateValue(int key,
short initialValueIfAbsent,
ShortToShortFunction function) |
MutableShortCollection |
values() |
IntShortHashMap |
withKeysValues(int key1,
short value1,
int key2,
short value2) |
IntShortHashMap |
withKeysValues(int key1,
short value1,
int key2,
short value2,
int key3,
short value3) |
IntShortHashMap |
withKeysValues(int key1,
short value1,
int key2,
short value2,
int key3,
short value3,
int key4,
short value4) |
IntShortHashMap |
withKeyValue(int key1,
short value1) |
IntShortHashMap |
withoutAllKeys(IntIterable keys) |
IntShortHashMap |
withoutKey(int key) |
void |
writeExternal(ObjectOutput out) |
public IntShortHashMap()
public IntShortHashMap(int initialCapacity)
public IntShortHashMap(IntShortMap map)
public static IntShortHashMap newWithKeysValues(int key1, short value1)
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2)
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
public boolean equals(Object obj)
IntShortMapMap.equals(Object).equals in interface IntShortMapequals in class Objectpublic int hashCode()
IntShortMapMap.hashCode().hashCode in interface IntShortMaphashCode in class Objectpublic String toString()
IntShortMaptoString in interface IntShortMaptoString in interface PrimitiveIterabletoString in class Objectpublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString 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 ShortIterator shortIterator()
shortIterator in interface ShortIterablepublic short[] toArray()
toArray in interface ShortIterablepublic boolean contains(short value)
contains in interface ShortIterablepublic boolean containsAll(short... source)
containsAll in interface ShortIterablepublic boolean containsAll(ShortIterable source)
containsAll in interface ShortIterablepublic void forEach(ShortProcedure procedure)
forEach in interface ShortIterablepublic MutableShortCollection select(ShortPredicate predicate)
select in interface MutableIntShortMapselect in interface ShortIterablepublic MutableShortCollection reject(ShortPredicate predicate)
reject in interface MutableIntShortMapreject in interface ShortIterablepublic <V> MutableCollection<V> collect(ShortToObjectFunction<? extends V> function)
collect in interface MutableIntShortMapcollect in interface ShortIterablepublic short detectIfNone(ShortPredicate predicate, short value)
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 <V> V injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function)
injectInto in interface ShortIterablepublic MutableShortList toList()
toList in interface ShortIterablepublic MutableShortSet toSet()
toSet in interface ShortIterablepublic MutableShortBag toBag()
toBag in interface ShortIterablepublic LazyShortIterable asLazy()
asLazy in interface ShortIterablepublic void clear()
clear in interface MutableIntShortMappublic void put(int key,
short value)
put in interface MutableIntShortMappublic void putAll(IntShortMap map)
putAll in interface MutableIntShortMappublic void removeKey(int key)
removeKey in interface MutableIntShortMappublic void remove(int key)
remove in interface MutableIntShortMappublic short removeKeyIfAbsent(int key,
short value)
removeKeyIfAbsent in interface MutableIntShortMappublic short getIfAbsentPut(int key,
short value)
getIfAbsentPut in interface MutableIntShortMappublic short getIfAbsentPut(int key,
ShortFunction0 function)
getIfAbsentPut in interface MutableIntShortMappublic <P> short getIfAbsentPutWith(int key,
ShortFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableIntShortMappublic short getIfAbsentPutWithKey(int key,
IntToShortFunction function)
getIfAbsentPutWithKey in interface MutableIntShortMappublic short addToValue(int key,
short toBeAdded)
addToValue in interface MutableIntShortMappublic short updateValue(int key,
short initialValueIfAbsent,
ShortToShortFunction function)
updateValue in interface MutableIntShortMappublic IntShortHashMap withKeyValue(int key1, short value1)
withKeyValue in interface MutableIntShortMappublic IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2)
public IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
public IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
public IntShortHashMap withoutKey(int key)
withoutKey in interface MutableIntShortMappublic IntShortHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys in interface MutableIntShortMappublic MutableIntShortMap asUnmodifiable()
asUnmodifiable in interface MutableIntShortMappublic MutableIntShortMap asSynchronized()
asSynchronized in interface MutableIntShortMappublic ImmutableIntShortMap toImmutable()
toImmutable in interface IntShortMappublic short get(int key)
get in interface IntShortMappublic short getIfAbsent(int key,
short ifAbsent)
getIfAbsent in interface IntShortMappublic short getOrThrow(int key)
getOrThrow in interface IntShortMappublic boolean containsKey(int key)
containsKey in interface IntShortMappublic boolean containsValue(short value)
containsValue in interface IntShortMappublic void forEachValue(ShortProcedure procedure)
forEachValue in interface IntShortMappublic void forEachKey(IntProcedure procedure)
forEachKey in interface IntShortMappublic void forEachKeyValue(IntShortProcedure procedure)
forEachKeyValue in interface IntShortMappublic LazyIntIterable keysView()
keysView in interface IntShortMappublic RichIterable<IntShortPair> keyValuesView()
keyValuesView in interface IntShortMappublic IntShortHashMap select(IntShortPredicate predicate)
select in interface IntShortMapselect in interface MutableIntShortMappublic IntShortHashMap reject(IntShortPredicate predicate)
reject in interface IntShortMapreject in interface MutableIntShortMappublic long sum()
sum in interface ShortIterablepublic short max()
max in interface ShortIterablepublic short maxIfEmpty(short defaultValue)
maxIfEmpty in interface ShortIterablepublic short min()
min in interface ShortIterablepublic short minIfEmpty(short defaultValue)
minIfEmpty in interface ShortIterablepublic double average()
average in interface ShortIterablepublic double median()
median in interface ShortIterablepublic short[] toSortedArray()
toSortedArray in interface ShortIterablepublic MutableShortList toSortedList()
toSortedList in interface ShortIterablepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void compact()
public MutableIntSet keySet()
keySet in interface IntShortMappublic MutableShortCollection values()
values in interface IntShortMapCopyright © 2004–2017. All rights reserved.