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 shortaddToValue(char key, short toBeAdded)MutableCharShortMapasSynchronized()MutableCharShortMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(char key)booleanequals(Object obj)MutableShortCharMapflipUniqueValues()voidforEachKey(CharProcedure procedure)voidforEachKeyValue(CharShortProcedure procedure)shortget(char key)shortgetAndPut(char key, short putValue, short defaultValue)shortgetIfAbsent(char key, short ifAbsent)shortgetIfAbsentPut(char key, short value)shortgetIfAbsentPut(char key, ShortFunction0 function)<P> shortgetIfAbsentPutWith(char key, ShortFunction<? super P> function, P parameter)shortgetIfAbsentPutWithKey(char key, CharToShortFunction function)shortgetOrThrow(char key)inthashCode()<V> VinjectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)MutableCharSetkeySet()LazyCharIterablekeysView()RichIterable<CharShortPair>keyValuesView()static CharShortHashMapnewWithKeysValues(char key1, short value1)static CharShortHashMapnewWithKeysValues(char key1, short value1, char key2, short value2)static CharShortHashMapnewWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)static CharShortHashMapnewWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)voidput(char key, short value)voidputAll(CharShortMap map)voidreadExternal(ObjectInput in)CharShortHashMapreject(CharShortPredicate predicate)voidremove(char key)voidremoveKey(char key)shortremoveKeyIfAbsent(char key, short value)CharShortHashMapselect(CharShortPredicate predicate)MutableShortIteratorshortIterator()ImmutableCharShortMaptoImmutable()StringtoString()booleantrimToSize()shortupdateValue(char key, short initialValueIfAbsent, ShortToShortFunction function)voidupdateValues(CharShortToShortFunction function)MutableShortCollectionvalues()CharShortHashMapwithKeysValues(char key1, short value1, char key2, short value2)CharShortHashMapwithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)CharShortHashMapwithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)CharShortHashMapwithKeyValue(char key1, short value1)CharShortHashMapwithoutAllKeys(CharIterable keys)CharShortHashMapwithoutKey(char key)voidwriteExternal(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:
equalsin interfaceCharShortMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCharShortMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceCharShortMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractShortIterable
-
shortIterator
public MutableShortIterator shortIterator()
- Specified by:
shortIteratorin interfaceMutableShortValuesMap- Specified by:
shortIteratorin interfaceShortIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceShortIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableCharKeysMap- Specified by:
clearin interfaceMutableShortValuesMap
-
put
public void put(char key, short value)- Specified by:
putin interfaceMutableCharShortMap
-
putAll
public void putAll(CharShortMap map)
- Specified by:
putAllin interfaceMutableCharShortMap
-
updateValues
public void updateValues(CharShortToShortFunction function)
- Specified by:
updateValuesin interfaceMutableCharShortMap
-
removeKey
public void removeKey(char key)
- Specified by:
removeKeyin interfaceMutableCharKeysMap- Specified by:
removeKeyin interfaceMutableCharShortMap
-
remove
public void remove(char key)
- Specified by:
removein interfaceMutableCharShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(char key, short value)- Specified by:
removeKeyIfAbsentin interfaceMutableCharShortMap
-
getIfAbsentPut
public short getIfAbsentPut(char key, short value)- Specified by:
getIfAbsentPutin interfaceMutableCharShortMap
-
getAndPut
public short getAndPut(char key, short putValue, short defaultValue)- Specified by:
getAndPutin interfaceMutableCharShortMap
-
getIfAbsentPut
public short getIfAbsentPut(char key, ShortFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableCharShortMap
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(char key, ShortFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableCharShortMap
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(char key, CharToShortFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableCharShortMap
-
addToValue
public short addToValue(char key, short toBeAdded)- Specified by:
addToValuein interfaceMutableCharShortMap
-
updateValue
public short updateValue(char key, short initialValueIfAbsent, ShortToShortFunction function)- Specified by:
updateValuein interfaceMutableCharShortMap
-
withKeyValue
public CharShortHashMap withKeyValue(char key1, short value1)
- Specified by:
withKeyValuein 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:
withoutKeyin interfaceMutableCharShortMap
-
withoutAllKeys
public CharShortHashMap withoutAllKeys(CharIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableCharShortMap
-
asUnmodifiable
public MutableCharShortMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableCharShortMap
-
asSynchronized
public MutableCharShortMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableCharShortMap
-
toImmutable
public ImmutableCharShortMap toImmutable()
- Specified by:
toImmutablein interfaceCharShortMap
-
get
public short get(char key)
- Specified by:
getin interfaceCharShortMap
-
getIfAbsent
public short getIfAbsent(char key, short ifAbsent)- Specified by:
getIfAbsentin interfaceCharShortMap
-
getOrThrow
public short getOrThrow(char key)
- Specified by:
getOrThrowin interfaceCharShortMap
-
containsKey
public boolean containsKey(char key)
- Specified by:
containsKeyin interfaceCharKeysMap- Specified by:
containsKeyin interfaceCharShortMap
-
forEachKey
public void forEachKey(CharProcedure procedure)
- Specified by:
forEachKeyin interfaceCharKeysMap- Specified by:
forEachKeyin interfaceCharShortMap
-
forEachKeyValue
public void forEachKeyValue(CharShortProcedure procedure)
- Specified by:
forEachKeyValuein interfaceCharShortMap
-
keysView
public LazyCharIterable keysView()
- Specified by:
keysViewin interfaceCharShortMap
-
keyValuesView
public RichIterable<CharShortPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceCharShortMap
-
flipUniqueValues
public MutableShortCharMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceCharShortMap- Specified by:
flipUniqueValuesin interfaceMutableCharShortMap
-
select
public CharShortHashMap select(CharShortPredicate predicate)
- Specified by:
selectin interfaceCharShortMap- Specified by:
selectin interfaceMutableCharShortMap
-
reject
public CharShortHashMap reject(CharShortPredicate predicate)
- Specified by:
rejectin interfaceCharShortMap- Specified by:
rejectin interfaceMutableCharShortMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
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:
keySetin interfaceCharShortMap
-
values
public MutableShortCollection values()
- Specified by:
valuesin interfaceShortValuesMap
-
-