Class ShortCharHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractCharIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableCharValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ShortCharHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,CharIterable
,CharValuesMap
,MutableCharValuesMap
,MutableShortCharMap
,ShortCharMap
,PrimitiveIterable
,MutableShortKeysMap
,ShortKeysMap
public class ShortCharHashMap extends AbstractMutableCharValuesMap implements MutableShortCharMap, Externalizable, MutableShortKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortCharHashMap()
ShortCharHashMap(int initialCapacity)
ShortCharHashMap(ShortCharMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description char
addToValue(short key, char toBeAdded)
MutableShortCharMap
asSynchronized()
MutableShortCharMap
asUnmodifiable()
MutableCharIterator
charIterator()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(short key)
boolean
equals(Object obj)
MutableCharShortMap
flipUniqueValues()
void
forEachKey(ShortProcedure procedure)
void
forEachKeyValue(ShortCharProcedure procedure)
char
get(short key)
char
getAndPut(short key, char putValue, char defaultValue)
char
getIfAbsent(short key, char ifAbsent)
char
getIfAbsentPut(short key, char value)
char
getIfAbsentPut(short key, CharFunction0 function)
<P> char
getIfAbsentPutWith(short key, CharFunction<? super P> function, P parameter)
char
getIfAbsentPutWithKey(short key, ShortToCharFunction function)
char
getOrThrow(short key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)
MutableShortSet
keySet()
LazyShortIterable
keysView()
RichIterable<ShortCharPair>
keyValuesView()
static ShortCharHashMap
newWithKeysValues(short key1, char value1)
static ShortCharHashMap
newWithKeysValues(short key1, char value1, short key2, char value2)
static ShortCharHashMap
newWithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3)
static ShortCharHashMap
newWithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3, short key4, char value4)
void
put(short key, char value)
void
putAll(ShortCharMap map)
void
readExternal(ObjectInput in)
ShortCharHashMap
reject(ShortCharPredicate predicate)
void
remove(short key)
void
removeKey(short key)
char
removeKeyIfAbsent(short key, char value)
ShortCharHashMap
select(ShortCharPredicate predicate)
ImmutableShortCharMap
toImmutable()
String
toString()
boolean
trimToSize()
char
updateValue(short key, char initialValueIfAbsent, CharToCharFunction function)
void
updateValues(ShortCharToCharFunction function)
MutableCharCollection
values()
ShortCharHashMap
withKeysValues(short key1, char value1, short key2, char value2)
ShortCharHashMap
withKeysValues(short key1, char value1, short key2, char value2, short key3, char value3)
ShortCharHashMap
withKeysValues(short key1, char value1, short key2, char value2, short key3, char value3, short key4, char value4)
ShortCharHashMap
withKeyValue(short key1, char value1)
ShortCharHashMap
withoutAllKeys(ShortIterable keys)
ShortCharHashMap
withoutKey(short key)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableCharValuesMap
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.AbstractCharIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
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.CharValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableCharValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortCharMap
putPair, withAllKeyValues
-
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.map.primitive.ShortCharMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, size
-
-
-
-
Constructor Detail
-
ShortCharHashMap
public ShortCharHashMap()
-
ShortCharHashMap
public ShortCharHashMap(int initialCapacity)
-
ShortCharHashMap
public ShortCharHashMap(ShortCharMap map)
-
-
Method Detail
-
newWithKeysValues
public static ShortCharHashMap newWithKeysValues(short key1, char value1)
-
newWithKeysValues
public static ShortCharHashMap newWithKeysValues(short key1, char value1, short key2, char value2)
-
newWithKeysValues
public static ShortCharHashMap newWithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3)
-
newWithKeysValues
public static ShortCharHashMap newWithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3, short key4, char value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceShortCharMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceShortCharMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Specified by:
toString
in interfaceShortCharMap
- Overrides:
toString
in classAbstractCharIterable
-
charIterator
public MutableCharIterator charIterator()
- Specified by:
charIterator
in interfaceCharIterable
- Specified by:
charIterator
in interfaceMutableCharValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceCharIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableCharValuesMap
- Specified by:
clear
in interfaceMutableShortKeysMap
-
put
public void put(short key, char value)
- Specified by:
put
in interfaceMutableShortCharMap
-
putAll
public void putAll(ShortCharMap map)
- Specified by:
putAll
in interfaceMutableShortCharMap
-
updateValues
public void updateValues(ShortCharToCharFunction function)
- Specified by:
updateValues
in interfaceMutableShortCharMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKey
in interfaceMutableShortCharMap
- Specified by:
removeKey
in interfaceMutableShortKeysMap
-
remove
public void remove(short key)
- Specified by:
remove
in interfaceMutableShortCharMap
-
removeKeyIfAbsent
public char removeKeyIfAbsent(short key, char value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableShortCharMap
-
getIfAbsentPut
public char getIfAbsentPut(short key, char value)
- Specified by:
getIfAbsentPut
in interfaceMutableShortCharMap
-
getAndPut
public char getAndPut(short key, char putValue, char defaultValue)
- Specified by:
getAndPut
in interfaceMutableShortCharMap
-
getIfAbsentPut
public char getIfAbsentPut(short key, CharFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableShortCharMap
-
getIfAbsentPutWith
public <P> char getIfAbsentPutWith(short key, CharFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableShortCharMap
-
getIfAbsentPutWithKey
public char getIfAbsentPutWithKey(short key, ShortToCharFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableShortCharMap
-
addToValue
public char addToValue(short key, char toBeAdded)
- Specified by:
addToValue
in interfaceMutableShortCharMap
-
updateValue
public char updateValue(short key, char initialValueIfAbsent, CharToCharFunction function)
- Specified by:
updateValue
in interfaceMutableShortCharMap
-
withKeyValue
public ShortCharHashMap withKeyValue(short key1, char value1)
- Specified by:
withKeyValue
in interfaceMutableShortCharMap
-
withKeysValues
public ShortCharHashMap withKeysValues(short key1, char value1, short key2, char value2)
-
withKeysValues
public ShortCharHashMap withKeysValues(short key1, char value1, short key2, char value2, short key3, char value3)
-
withKeysValues
public ShortCharHashMap withKeysValues(short key1, char value1, short key2, char value2, short key3, char value3, short key4, char value4)
-
withoutKey
public ShortCharHashMap withoutKey(short key)
- Specified by:
withoutKey
in interfaceMutableShortCharMap
-
withoutAllKeys
public ShortCharHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableShortCharMap
-
asUnmodifiable
public MutableShortCharMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableShortCharMap
-
asSynchronized
public MutableShortCharMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableShortCharMap
-
toImmutable
public ImmutableShortCharMap toImmutable()
- Specified by:
toImmutable
in interfaceShortCharMap
-
get
public char get(short key)
- Specified by:
get
in interfaceShortCharMap
-
getIfAbsent
public char getIfAbsent(short key, char ifAbsent)
- Specified by:
getIfAbsent
in interfaceShortCharMap
-
getOrThrow
public char getOrThrow(short key)
- Specified by:
getOrThrow
in interfaceShortCharMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKey
in interfaceShortCharMap
- Specified by:
containsKey
in interfaceShortKeysMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKey
in interfaceShortCharMap
- Specified by:
forEachKey
in interfaceShortKeysMap
-
forEachKeyValue
public void forEachKeyValue(ShortCharProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceShortCharMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysView
in interfaceShortCharMap
-
keyValuesView
public RichIterable<ShortCharPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceShortCharMap
-
flipUniqueValues
public MutableCharShortMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableShortCharMap
- Specified by:
flipUniqueValues
in interfaceShortCharMap
-
select
public ShortCharHashMap select(ShortCharPredicate predicate)
- Specified by:
select
in interfaceMutableShortCharMap
- Specified by:
select
in interfaceShortCharMap
-
reject
public ShortCharHashMap reject(ShortCharPredicate predicate)
- Specified by:
reject
in interfaceMutableShortCharMap
- Specified by:
reject
in interfaceShortCharMap
-
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 MutableShortSet keySet()
- Specified by:
keySet
in interfaceShortCharMap
-
values
public MutableCharCollection values()
- Specified by:
values
in interfaceCharValuesMap
-
-