Class CharShortHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractShortIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.CharShortHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,CharShortMap
,MutableCharShortMap
,MutableShortValuesMap
,ShortValuesMap
,PrimitiveIterable
,ShortIterable
,MutableCharKeysMap
,CharKeysMap
public class CharShortHashMap extends AbstractMutableShortValuesMap implements MutableCharShortMap, Externalizable, MutableCharKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CharShortHashMap()
CharShortHashMap(int initialCapacity)
CharShortHashMap(CharShortMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description short
addToValue(char key, short toBeAdded)
MutableCharShortMap
asSynchronized()
MutableCharShortMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(char key)
boolean
equals(Object obj)
MutableShortCharMap
flipUniqueValues()
void
forEachKey(CharProcedure procedure)
void
forEachKeyValue(CharShortProcedure procedure)
short
get(char key)
short
getAndPut(char key, short putValue, short defaultValue)
short
getIfAbsent(char key, short ifAbsent)
short
getIfAbsentPut(char key, short value)
short
getIfAbsentPut(char key, ShortFunction0 function)
<P> short
getIfAbsentPutWith(char key, ShortFunction<? super P> function, P parameter)
short
getIfAbsentPutWithKey(char key, CharToShortFunction function)
short
getOrThrow(char key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
MutableCharSet
keySet()
LazyCharIterable
keysView()
RichIterable<CharShortPair>
keyValuesView()
static CharShortHashMap
newWithKeysValues(char key1, short value1)
static CharShortHashMap
newWithKeysValues(char key1, short value1, char key2, short value2)
static CharShortHashMap
newWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)
static CharShortHashMap
newWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)
void
put(char key, short value)
void
putAll(CharShortMap map)
void
readExternal(ObjectInput in)
CharShortHashMap
reject(CharShortPredicate predicate)
void
remove(char key)
void
removeKey(char key)
short
removeKeyIfAbsent(char key, short value)
CharShortHashMap
select(CharShortPredicate predicate)
MutableShortIterator
shortIterator()
ImmutableCharShortMap
toImmutable()
String
toString()
boolean
trimToSize()
short
updateValue(char key, short initialValueIfAbsent, ShortToShortFunction function)
void
updateValues(CharShortToShortFunction function)
MutableShortCollection
values()
CharShortHashMap
withKeysValues(char key1, short value1, char key2, short value2)
CharShortHashMap
withKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)
CharShortHashMap
withKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)
CharShortHashMap
withKeyValue(char key1, short value1)
CharShortHashMap
withoutAllKeys(CharIterable keys)
CharShortHashMap
withoutKey(char key)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEachValue, isEmpty, max, min, notEmpty, reject, select, size, sum, toArray, toArray
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.CharKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.CharShortMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableCharShortMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortValuesMap
containsValue, forEachValue, tap
-
-
-
-
Constructor Detail
-
CharShortHashMap
public CharShortHashMap()
-
CharShortHashMap
public CharShortHashMap(int initialCapacity)
-
CharShortHashMap
public CharShortHashMap(CharShortMap map)
-
-
Method Detail
-
newWithKeysValues
public static CharShortHashMap newWithKeysValues(char key1, short value1)
-
newWithKeysValues
public static CharShortHashMap newWithKeysValues(char key1, short value1, char key2, short value2)
-
newWithKeysValues
public static CharShortHashMap newWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)
-
newWithKeysValues
public static CharShortHashMap newWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCharShortMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCharShortMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceCharShortMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractShortIterable
-
shortIterator
public MutableShortIterator shortIterator()
- Specified by:
shortIterator
in interfaceMutableShortValuesMap
- Specified by:
shortIterator
in interfaceShortIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceShortIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableCharKeysMap
- Specified by:
clear
in interfaceMutableShortValuesMap
-
put
public void put(char key, short value)
- Specified by:
put
in interfaceMutableCharShortMap
-
putAll
public void putAll(CharShortMap map)
- Specified by:
putAll
in interfaceMutableCharShortMap
-
updateValues
public void updateValues(CharShortToShortFunction function)
- Specified by:
updateValues
in interfaceMutableCharShortMap
-
removeKey
public void removeKey(char key)
- Specified by:
removeKey
in interfaceMutableCharKeysMap
- Specified by:
removeKey
in interfaceMutableCharShortMap
-
remove
public void remove(char key)
- Specified by:
remove
in interfaceMutableCharShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(char key, short value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableCharShortMap
-
getIfAbsentPut
public short getIfAbsentPut(char key, short value)
- Specified by:
getIfAbsentPut
in interfaceMutableCharShortMap
-
getAndPut
public short getAndPut(char key, short putValue, short defaultValue)
- Specified by:
getAndPut
in interfaceMutableCharShortMap
-
getIfAbsentPut
public short getIfAbsentPut(char key, ShortFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableCharShortMap
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(char key, ShortFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableCharShortMap
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(char key, CharToShortFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableCharShortMap
-
addToValue
public short addToValue(char key, short toBeAdded)
- Specified by:
addToValue
in interfaceMutableCharShortMap
-
updateValue
public short updateValue(char key, short initialValueIfAbsent, ShortToShortFunction function)
- Specified by:
updateValue
in interfaceMutableCharShortMap
-
withKeyValue
public CharShortHashMap withKeyValue(char key1, short value1)
- Specified by:
withKeyValue
in interfaceMutableCharShortMap
-
withKeysValues
public CharShortHashMap withKeysValues(char key1, short value1, char key2, short value2)
-
withKeysValues
public CharShortHashMap withKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)
-
withKeysValues
public CharShortHashMap withKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)
-
withoutKey
public CharShortHashMap withoutKey(char key)
- Specified by:
withoutKey
in interfaceMutableCharShortMap
-
withoutAllKeys
public CharShortHashMap withoutAllKeys(CharIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableCharShortMap
-
asUnmodifiable
public MutableCharShortMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableCharShortMap
-
asSynchronized
public MutableCharShortMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableCharShortMap
-
toImmutable
public ImmutableCharShortMap toImmutable()
- Specified by:
toImmutable
in interfaceCharShortMap
-
get
public short get(char key)
- Specified by:
get
in interfaceCharShortMap
-
getIfAbsent
public short getIfAbsent(char key, short ifAbsent)
- Specified by:
getIfAbsent
in interfaceCharShortMap
-
getOrThrow
public short getOrThrow(char key)
- Specified by:
getOrThrow
in interfaceCharShortMap
-
containsKey
public boolean containsKey(char key)
- Specified by:
containsKey
in interfaceCharKeysMap
- Specified by:
containsKey
in interfaceCharShortMap
-
forEachKey
public void forEachKey(CharProcedure procedure)
- Specified by:
forEachKey
in interfaceCharKeysMap
- Specified by:
forEachKey
in interfaceCharShortMap
-
forEachKeyValue
public void forEachKeyValue(CharShortProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceCharShortMap
-
keysView
public LazyCharIterable keysView()
- Specified by:
keysView
in interfaceCharShortMap
-
keyValuesView
public RichIterable<CharShortPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceCharShortMap
-
flipUniqueValues
public MutableShortCharMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceCharShortMap
- Specified by:
flipUniqueValues
in interfaceMutableCharShortMap
-
select
public CharShortHashMap select(CharShortPredicate predicate)
- Specified by:
select
in interfaceCharShortMap
- Specified by:
select
in interfaceMutableCharShortMap
-
reject
public CharShortHashMap reject(CharShortPredicate predicate)
- Specified by:
reject
in interfaceCharShortMap
- Specified by:
reject
in interfaceMutableCharShortMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
keySet
public MutableCharSet keySet()
- Specified by:
keySet
in interfaceCharShortMap
-
values
public MutableShortCollection values()
- Specified by:
values
in interfaceShortValuesMap
-
-