Class ObjectShortHashMapWithHashingStrategy<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.ObjectShortHashMapWithHashingStrategy<K>
-
- All Implemented Interfaces:
Externalizable,Serializable,MutableObjectShortMap<K>,ObjectShortMap<K>,PrimitiveIterable,ShortIterable
public class ObjectShortHashMapWithHashingStrategy<K> extends Object implements MutableObjectShortMap<K>, Externalizable
This file was automatically generated from template file objectPrimitiveHashMapWithHashingStrategy.stg.- Since:
- 7.0.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static shortEMPTY_VALUE
-
Constructor Summary
Constructors Constructor Description ObjectShortHashMapWithHashingStrategy()Deprecated.Use ObjectShortHashMapWithHashingStrategy(HashingStrategy) instead.ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy)ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity)ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectShortMap<? extends K> map)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectShortMap
putPair, tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectShortMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListBy
-
-
-
-
Field Detail
-
EMPTY_VALUE
public static final short EMPTY_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectShortHashMapWithHashingStrategy
@Deprecated public ObjectShortHashMapWithHashingStrategy()
Deprecated.Use ObjectShortHashMapWithHashingStrategy(HashingStrategy) instead.
-
ObjectShortHashMapWithHashingStrategy
public ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy)
-
ObjectShortHashMapWithHashingStrategy
public ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity)
-
ObjectShortHashMapWithHashingStrategy
public ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectShortMap<? extends K> map)
-
-
Method Detail
-
newMap
public static <K> ObjectShortHashMapWithHashingStrategy<K> newMap(HashingStrategy<? super K> hashingStrategy)
-
newMap
public static <K> ObjectShortHashMapWithHashingStrategy<K> newMap(HashingStrategy<? super K> hashingStrategy, ObjectShortMap<K> map)
-
newMap
public static <K> ObjectShortHashMapWithHashingStrategy<K> newMap(ObjectShortHashMapWithHashingStrategy<K> map)
-
newMapWithInitialCapacity
public static <K> ObjectShortHashMapWithHashingStrategy<K> newMapWithInitialCapacity(HashingStrategy<? super K> hashingStrategy, int initialCapacity)
-
newWithKeysValues
public static <K> ObjectShortHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, short value1)
-
newWithKeysValues
public static <K> ObjectShortHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, short value1, K key2, short value2)
-
newWithKeysValues
public static <K> ObjectShortHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, short value1, K key2, short value2, K key3, short value3)
-
newWithKeysValues
public static <K> ObjectShortHashMapWithHashingStrategy<K> newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, short value1, K key2, short value2, K key3, short value3, K key4, short value4)
-
toString
public String toString()
- Specified by:
toStringin interfaceObjectShortMap<K>- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
shortIterator
public MutableShortIterator shortIterator()
- Specified by:
shortIteratorin interfaceMutableObjectShortMap<K>- Specified by:
shortIteratorin interfaceShortIterable
-
toArray
public short[] toArray()
- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] target)
- Specified by:
toArrayin interfaceShortIterable
-
contains
public boolean contains(short value)
- Specified by:
containsin interfaceShortIterable
-
containsAll
public boolean containsAll(short... source)
- Specified by:
containsAllin interfaceShortIterable
-
containsAll
public boolean containsAll(ShortIterable source)
- Specified by:
containsAllin interfaceShortIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableObjectShortMap<K>
-
put
public void put(K key, short value)
- Specified by:
putin interfaceMutableObjectShortMap<K>
-
putAll
public void putAll(ObjectShortMap<? extends K> map)
- Specified by:
putAllin interfaceMutableObjectShortMap<K>
-
updateValues
public void updateValues(ObjectShortToShortFunction<? super K> function)
- Specified by:
updateValuesin interfaceMutableObjectShortMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKeyin interfaceMutableObjectShortMap<K>
-
removeKeyAtIndex
public void removeKeyAtIndex(K key, int index)
-
remove
public void remove(Object key)
- Specified by:
removein interfaceMutableObjectShortMap<K>
-
removeKeyIfAbsent
public short removeKeyIfAbsent(K key, short value)
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectShortMap<K>
-
getIfAbsentPut
public short getIfAbsentPut(K key, short value)
- Specified by:
getIfAbsentPutin interfaceMutableObjectShortMap<K>
-
getAndPut
public short getAndPut(K key, short putValue, short defaultValue)
- Specified by:
getAndPutin interfaceMutableObjectShortMap<K>
-
getIfAbsentPut
public short getIfAbsentPut(K key, ShortFunction0 function)
- Specified by:
getIfAbsentPutin interfaceMutableObjectShortMap<K>
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(K key, ShortFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectShortMap<K>
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(K key, ShortFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectShortMap<K>
-
updateValue
public short updateValue(K key, short initialValueIfAbsent, ShortToShortFunction function)
- Specified by:
updateValuein interfaceMutableObjectShortMap<K>
-
addToValue
public short addToValue(K key, short toBeAdded)
- Specified by:
addToValuein interfaceMutableObjectShortMap<K>
-
withKeyValue
public ObjectShortHashMapWithHashingStrategy<K> withKeyValue(K key1, short value1)
- Specified by:
withKeyValuein interfaceMutableObjectShortMap<K>
-
withKeysValues
public ObjectShortHashMapWithHashingStrategy<K> withKeysValues(K key1, short value1, K key2, short value2)
-
withKeysValues
public ObjectShortHashMapWithHashingStrategy<K> withKeysValues(K key1, short value1, K key2, short value2, K key3, short value3)
-
withKeysValues
public ObjectShortHashMapWithHashingStrategy<K> withKeysValues(K key1, short value1, K key2, short value2, K key3, short value3, K key4, short value4)
-
withoutKey
public ObjectShortHashMapWithHashingStrategy<K> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableObjectShortMap<K>
-
withoutAllKeys
public ObjectShortHashMapWithHashingStrategy<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableObjectShortMap<K>
-
asUnmodifiable
public MutableObjectShortMap<K> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableObjectShortMap<K>
-
asSynchronized
public MutableObjectShortMap<K> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableObjectShortMap<K>
-
toImmutable
public ImmutableObjectShortMap<K> toImmutable()
- Specified by:
toImmutablein interfaceObjectShortMap<K>
-
get
public short get(Object key)
- Specified by:
getin interfaceObjectShortMap<K>
-
getOrThrow
public short getOrThrow(Object key)
- Specified by:
getOrThrowin interfaceObjectShortMap<K>
-
getIfAbsent
public short getIfAbsent(Object key, short ifAbsent)
- Specified by:
getIfAbsentin interfaceObjectShortMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceObjectShortMap<K>
-
containsValue
public boolean containsValue(short value)
- Specified by:
containsValuein interfaceObjectShortMap<K>
-
each
public void each(ShortProcedure procedure)
- Specified by:
eachin interfaceShortIterable
-
forEachValue
public void forEachValue(ShortProcedure procedure)
- Specified by:
forEachValuein interfaceObjectShortMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceObjectShortMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectShortProcedure<? super K> procedure)
- Specified by:
forEachKeyValuein interfaceObjectShortMap<K>
-
select
public ObjectShortHashMapWithHashingStrategy<K> select(ObjectShortPredicate<? super K> predicate)
- Specified by:
selectin interfaceMutableObjectShortMap<K>- Specified by:
selectin interfaceObjectShortMap<K>
-
reject
public ObjectShortHashMapWithHashingStrategy<K> reject(ObjectShortPredicate<? super K> predicate)
- Specified by:
rejectin interfaceMutableObjectShortMap<K>- Specified by:
rejectin interfaceObjectShortMap<K>
-
select
public MutableShortCollection select(ShortPredicate predicate)
- Specified by:
selectin interfaceMutableObjectShortMap<K>- Specified by:
selectin interfaceShortIterable
-
reject
public MutableShortCollection reject(ShortPredicate predicate)
- Specified by:
rejectin interfaceMutableObjectShortMap<K>- Specified by:
rejectin interfaceShortIterable
-
detectIfNone
public short detectIfNone(ShortPredicate predicate, short ifNone)
- Specified by:
detectIfNonein interfaceShortIterable
-
collect
public <V> MutableCollection<V> collect(ShortToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceMutableObjectShortMap<K>- Specified by:
collectin interfaceShortIterable
-
count
public int count(ShortPredicate predicate)
- Specified by:
countin interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
- Specified by:
allSatisfyin interfaceShortIterable
-
noneSatisfy
public boolean noneSatisfy(ShortPredicate predicate)
- Specified by:
noneSatisfyin interfaceShortIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceShortIterable
-
chunk
public RichIterable<ShortIterable> chunk(int size)
- Specified by:
chunkin interfaceShortIterable
-
sum
public long sum()
- Specified by:
sumin interfaceShortIterable
-
max
public short max()
- Specified by:
maxin interfaceShortIterable
-
min
public short min()
- Specified by:
minin interfaceShortIterable
-
maxIfEmpty
public short maxIfEmpty(short defaultValue)
- Specified by:
maxIfEmptyin interfaceShortIterable
-
minIfEmpty
public short minIfEmpty(short defaultValue)
- Specified by:
minIfEmptyin interfaceShortIterable
-
average
public double average()
- Specified by:
averagein interfaceShortIterable
-
median
public double median()
- Specified by:
medianin interfaceShortIterable
-
toList
public MutableShortList toList()
- Specified by:
toListin interfaceShortIterable
-
toSet
public MutableShortSet toSet()
- Specified by:
toSetin interfaceShortIterable
-
toBag
public MutableShortBag toBag()
- Specified by:
toBagin interfaceShortIterable
-
asLazy
public LazyShortIterable asLazy()
- Specified by:
asLazyin interfaceShortIterable
-
toSortedArray
public short[] toSortedArray()
- Specified by:
toSortedArrayin interfaceShortIterable
-
toSortedList
public MutableShortList toSortedList()
- Specified by:
toSortedListin interfaceShortIterable
-
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
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysViewin interfaceObjectShortMap<K>
-
keyValuesView
public RichIterable<ObjectShortPair<K>> keyValuesView()
- Specified by:
keyValuesViewin interfaceObjectShortMap<K>
-
flipUniqueValues
public MutableShortObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableObjectShortMap<K>- Specified by:
flipUniqueValuesin interfaceObjectShortMap<K>
-
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 Set<K> keySet()
- Specified by:
keySetin interfaceObjectShortMap<K>
-
values
public MutableShortCollection values()
- Specified by:
valuesin interfaceObjectShortMap<K>
-
-