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 charaddToValue(short key, char toBeAdded)MutableShortCharMapasSynchronized()MutableShortCharMapasUnmodifiable()MutableCharIteratorcharIterator()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(short key)booleanequals(Object obj)MutableCharShortMapflipUniqueValues()voidforEachKey(ShortProcedure procedure)voidforEachKeyValue(ShortCharProcedure procedure)charget(short key)chargetAndPut(short key, char putValue, char defaultValue)chargetIfAbsent(short key, char ifAbsent)chargetIfAbsentPut(short key, char value)chargetIfAbsentPut(short key, CharFunction0 function)<P> chargetIfAbsentPutWith(short key, CharFunction<? super P> function, P parameter)chargetIfAbsentPutWithKey(short key, ShortToCharFunction function)chargetOrThrow(short key)inthashCode()<V> VinjectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)MutableShortSetkeySet()LazyShortIterablekeysView()RichIterable<ShortCharPair>keyValuesView()static ShortCharHashMapnewWithKeysValues(short key1, char value1)static ShortCharHashMapnewWithKeysValues(short key1, char value1, short key2, char value2)static ShortCharHashMapnewWithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3)static ShortCharHashMapnewWithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3, short key4, char value4)voidput(short key, char value)voidputAll(ShortCharMap map)voidreadExternal(ObjectInput in)ShortCharHashMapreject(ShortCharPredicate predicate)voidremove(short key)voidremoveKey(short key)charremoveKeyIfAbsent(short key, char value)ShortCharHashMapselect(ShortCharPredicate predicate)ImmutableShortCharMaptoImmutable()StringtoString()booleantrimToSize()charupdateValue(short key, char initialValueIfAbsent, CharToCharFunction function)voidupdateValues(ShortCharToCharFunction function)MutableCharCollectionvalues()ShortCharHashMapwithKeysValues(short key1, char value1, short key2, char value2)ShortCharHashMapwithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3)ShortCharHashMapwithKeysValues(short key1, char value1, short key2, char value2, short key3, char value3, short key4, char value4)ShortCharHashMapwithKeyValue(short key1, char value1)ShortCharHashMapwithoutAllKeys(ShortIterable keys)ShortCharHashMapwithoutKey(short key)voidwriteExternal(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:
equalsin interfaceShortCharMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortCharMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortCharMap- Overrides:
toStringin classAbstractCharIterable
-
charIterator
public MutableCharIterator charIterator()
- Specified by:
charIteratorin interfaceCharIterable- Specified by:
charIteratorin interfaceMutableCharValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceCharIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableCharValuesMap- Specified by:
clearin interfaceMutableShortKeysMap
-
put
public void put(short key, char value)- Specified by:
putin interfaceMutableShortCharMap
-
putAll
public void putAll(ShortCharMap map)
- Specified by:
putAllin interfaceMutableShortCharMap
-
updateValues
public void updateValues(ShortCharToCharFunction function)
- Specified by:
updateValuesin interfaceMutableShortCharMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKeyin interfaceMutableShortCharMap- Specified by:
removeKeyin interfaceMutableShortKeysMap
-
remove
public void remove(short key)
- Specified by:
removein interfaceMutableShortCharMap
-
removeKeyIfAbsent
public char removeKeyIfAbsent(short key, char value)- Specified by:
removeKeyIfAbsentin interfaceMutableShortCharMap
-
getIfAbsentPut
public char getIfAbsentPut(short key, char value)- Specified by:
getIfAbsentPutin interfaceMutableShortCharMap
-
getAndPut
public char getAndPut(short key, char putValue, char defaultValue)- Specified by:
getAndPutin interfaceMutableShortCharMap
-
getIfAbsentPut
public char getIfAbsentPut(short key, CharFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableShortCharMap
-
getIfAbsentPutWith
public <P> char getIfAbsentPutWith(short key, CharFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableShortCharMap
-
getIfAbsentPutWithKey
public char getIfAbsentPutWithKey(short key, ShortToCharFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortCharMap
-
addToValue
public char addToValue(short key, char toBeAdded)- Specified by:
addToValuein interfaceMutableShortCharMap
-
updateValue
public char updateValue(short key, char initialValueIfAbsent, CharToCharFunction function)- Specified by:
updateValuein interfaceMutableShortCharMap
-
withKeyValue
public ShortCharHashMap withKeyValue(short key1, char value1)
- Specified by:
withKeyValuein 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:
withoutKeyin interfaceMutableShortCharMap
-
withoutAllKeys
public ShortCharHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableShortCharMap
-
asUnmodifiable
public MutableShortCharMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortCharMap
-
asSynchronized
public MutableShortCharMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortCharMap
-
toImmutable
public ImmutableShortCharMap toImmutable()
- Specified by:
toImmutablein interfaceShortCharMap
-
get
public char get(short key)
- Specified by:
getin interfaceShortCharMap
-
getIfAbsent
public char getIfAbsent(short key, char ifAbsent)- Specified by:
getIfAbsentin interfaceShortCharMap
-
getOrThrow
public char getOrThrow(short key)
- Specified by:
getOrThrowin interfaceShortCharMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKeyin interfaceShortCharMap- Specified by:
containsKeyin interfaceShortKeysMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKeyin interfaceShortCharMap- Specified by:
forEachKeyin interfaceShortKeysMap
-
forEachKeyValue
public void forEachKeyValue(ShortCharProcedure procedure)
- Specified by:
forEachKeyValuein interfaceShortCharMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysViewin interfaceShortCharMap
-
keyValuesView
public RichIterable<ShortCharPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceShortCharMap
-
flipUniqueValues
public MutableCharShortMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableShortCharMap- Specified by:
flipUniqueValuesin interfaceShortCharMap
-
select
public ShortCharHashMap select(ShortCharPredicate predicate)
- Specified by:
selectin interfaceMutableShortCharMap- Specified by:
selectin interfaceShortCharMap
-
reject
public ShortCharHashMap reject(ShortCharPredicate predicate)
- Specified by:
rejectin interfaceMutableShortCharMap- Specified by:
rejectin interfaceShortCharMap
-
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 MutableShortSet keySet()
- Specified by:
keySetin interfaceShortCharMap
-
values
public MutableCharCollection values()
- Specified by:
valuesin interfaceCharValuesMap
-
-