Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.map.mutable.primitive

public Class ObjectShortHashMapWithHashingStrategy<K>

extends Object
implements MutableObjectShortMap<K>, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.map.primitive.MutableObjectShortMap, org.eclipse.collections.api.map.primitive.ObjectShortMap, org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.PrimitiveIterable
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.lang.reflect.Array, java.util.Arrays, .Collection, .Iterator, .NoSuchElementException, .Set, org.eclipse.collections.api.ShortIterable, .LazyShortIterable, .LazyIterable, .RichIterable, org.eclipse.collections.api.bag.primitive.MutableShortBag, org.eclipse.collections.api.block.HashingStrategy, org.eclipse.collections.api.block.function.primitive.ShortFunction, .ShortFunction0, .ShortToShortFunction, .ShortToObjectFunction, .ObjectShortToShortFunction, .ObjectShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.ShortPredicate, .ObjectShortPredicate, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.ShortProcedure, .ObjectShortProcedure, .ObjectIntProcedure, org.eclipse.collections.api.collection.MutableCollection, org.eclipse.collections.api.collection.primitive.ImmutableShortCollection, .MutableShortCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.ShortBags, .ShortLists, .ShortSets, .ObjectShortMaps, .ShortObjectMaps, org.eclipse.collections.impl.lazy.primitive.LazyShortIterableAdapter, org.eclipse.collections.api.iterator.ShortIterator, .MutableShortIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.MutableShortList, org.eclipse.collections.api.map.primitive.ImmutableObjectShortMap, .MutableObjectShortMap, .MutableShortObjectMap, .ObjectShortMap, org.eclipse.collections.api.set.primitive.ShortSet, .MutableShortSet, org.eclipse.collections.api.tuple.primitive.ObjectShortPair, org.eclipse.collections.impl.collection.mutable.primitive.SynchronizedShortCollection, .UnmodifiableShortCollection, org.eclipse.collections.impl.lazy.AbstractLazyIterable, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples

This file was automatically generated from template file objectPrimitiveHashMapWithHashingStrategy.stg.
Since
7.0.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
private class
private class
private class
private class

Field Summary

Modifier and TypeField and Description
private static final int
public static final short
private HashingStrategy<? super K>
private Object[]
private static final Object
private int
private int
private static final Object
private static final long
private short[]

Constructor Summary

AccessConstructor and Description
public
ObjectShortHashMapWithHashingStrategy()
Deprecated Use ObjectShortHashMapWithHashingStrategy(HashingStrategy) instead.

public
public
ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity)

public
ObjectShortHashMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, ObjectShortMap<? extends K> map)

Method Summary

Modifier and TypeMethod and Description
private void
addKeyValueAtIndex(K key, short value, int index)

public short
protected void
allocateTable(int sizeToAllocate)

public boolean
allSatisfy(ShortPredicate predicate)

Implements org.eclipse.collections.api.ShortIterable.allSatisfy.

Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.

public boolean
public boolean
anySatisfy(ShortPredicate predicate)

Implements org.eclipse.collections.api.ShortIterable.anySatisfy.

Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyShortIterable
asLazy()

Implements org.eclipse.collections.api.ShortIterable.asLazy.

Returns a LazyShortIterable adapter wrapping the source ShortIterable.

public MutableObjectShortMap<K>
public MutableObjectShortMap<K>
public double
public RichIterable<ShortIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.ShortIterable.chunk.

Partitions elements in fixed size chunks.

public void
clear()

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.clear.

Removes all entries from this map.

public <V> MutableCollection<V>
collect(ShortToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public void
compact()
Deprecated since 12.0 - Use trimToSize() instead

Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.

public boolean
contains(short value)

Implements org.eclipse.collections.api.ShortIterable.contains.

Returns true if the value is contained in the ShortIterable, and false if it is not.

public boolean
containsAll(short... source)

Overrides default org.eclipse.collections.api.ShortIterable.containsAll.

Returns true if all of the values specified in the source array are contained in the ShortIterable, and false if they are not.

public boolean
containsAll(ShortIterable source)

Overrides default org.eclipse.collections.api.ShortIterable.containsAll.

Returns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.

public boolean
containsKey(Object key)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.containsKey.

Returns whether or not the key is present in the map.

public boolean
containsValue(short value)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.containsValue.

Returns whether or not this map contains the value.

public int
count(ShortPredicate predicate)

Implements org.eclipse.collections.api.ShortIterable.count.

Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.

public short
public void
each(ShortProcedure procedure)

Implements org.eclipse.collections.api.ShortIterable.each.

A synonym for forEach.

public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

private int
fastCeil(float v)

public MutableShortObjectMap<K>
flipUniqueValues()

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.flipUniqueValues.

Return the ShortObjectMap that is obtained by flipping the direction of this map and making the associations from value to key.

public void
forEachKey(Procedure<? super K> procedure)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.forEachKey.

Iterates through each key in the map, invoking the procedure for each.

public void
forEachKeyValue(ObjectShortProcedure<? super K> procedure)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.forEachKeyValue.

Iterates through each key/value pair in the map, invoking the procedure for each.

public void
forEachValue(ShortProcedure procedure)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.forEachValue.

Iterates through each value in this map.

public short
get(Object key)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.get.

Retrieves the value associated with the key.

public short
getAndPut(K key, short putValue, short defaultValue)

Overrides default org.eclipse.collections.api.map.primitive.MutableObjectShortMap.getAndPut.

Retrieves the value associated with the key if one exists; if it does not, associates a putValue with the key.

public short
getIfAbsent(Object key, short ifAbsent)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.getIfAbsent.

Retrieves the value associated with the key, returning the specified default value if no such mapping exists.

public short
getIfAbsentPut(K key, short value)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.getIfAbsentPut.

Retrieves the value associated with the key if one exists; if it does not, associates a value with the key.

public short
getIfAbsentPut(K key, ShortFunction0 function)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.getIfAbsentPut.

Retrieves the value associated with the key if one exists; if it does not, invokes the supplier and associates the result with the key.

public <P> short
getIfAbsentPutWith(K key, ShortFunction<? super P> function, P parameter)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.getIfAbsentPutWith.

Retrieves the value associated with the key if one exists; if it does not, invokes the value function with the parameter and associates the result with the key.

public short
getIfAbsentPutWithKey(K key, ShortFunction<? super K> function)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.getIfAbsentPutWithKey.

Retrieves the value associated with the key if one exists; if it does not, associates the result of invoking the value function with the key.

public short
getOrThrow(Object key)

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.getOrThrow.

Retrieves the value associated with the key, throwing an IllegalStateException if no such mapping exists.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public <V> V
injectInto(V injectedValue, ObjectShortToObjectFunction<? super V, ? extends V> function)

Implements org.eclipse.collections.api.ShortIterable.injectInto.

public boolean
isEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.isEmpty.

Returns true if this iterable has zero items.

private static <K> boolean
private static boolean
public Set<K>
keySet()

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.keySet.

Returns a set containing all the keys in this map.

public LazyIterable<K>
keysView()

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.keysView.

Returns a view of the keys in this map.

public RichIterable<ObjectShortPair<K>>
keyValuesView()

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.keyValuesView.

Returns a view of the key/value pairs in this map.

public String
makeString()

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

public String
makeString(String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

public String
makeString(String start, String separator, String end)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

public short
public short
private int
public double
public short
public short
public static <K> ObjectShortHashMapWithHashingStrategy<K>
newMap(HashingStrategy<? super K> hashingStrategy)

public static <K> ObjectShortHashMapWithHashingStrategy<K>
newMap(HashingStrategy<? super K> hashingStrategy, ObjectShortMap<K> map)

public static <K> ObjectShortHashMapWithHashingStrategy<K>
public static <K> ObjectShortHashMapWithHashingStrategy<K>
newMapWithInitialCapacity(HashingStrategy<? super K> hashingStrategy, int initialCapacity)

public static <K> ObjectShortHashMapWithHashingStrategy<K>
newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, short value1)

public static <K> ObjectShortHashMapWithHashingStrategy<K>
newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, short value1, K key2, short value2)

public static <K> ObjectShortHashMapWithHashingStrategy<K>
newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, short value1, K key2, short value2, K key3, short value3)

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)

public boolean
noneSatisfy(ShortPredicate predicate)

Overrides default org.eclipse.collections.api.ShortIterable.noneSatisfy.

Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.

public boolean
notEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.notEmpty.

The English equivalent of !this.isEmpty()

private boolean
nullSafeEquals(K value, Object other)

pack-priv int
probe(Object element)

public void
put(K key, short value)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.put.

Associates a value with the specified key.

public void
putAll(ObjectShortMap<? extends K> map)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.putAll.

Puts all of the key/value mappings from the specified map into this map.

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

private void
rehash(int newCapacity)

private void
public ObjectShortHashMapWithHashingStrategy<K>
reject(ObjectShortPredicate<? super K> predicate)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.reject.

Return a copy of this map containing only the key/value pairs that do not match the predicate.

public MutableShortCollection
reject(ShortPredicate predicate)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.reject.

Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.

public void
remove(Object key)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.remove.

Removes the mapping associated with the key, if one exists, from the map.

public void
removeKey(K key)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.removeKey.

Removes the mapping associated with the key, if one exists, from the map.

public void
removeKeyAtIndex(K key, int index)

public short
removeKeyIfAbsent(K key, short value)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.removeKeyIfAbsent.

Removes the mapping associated with the key, if one exists, from the map, returning the previously associated value with the key.

public ObjectShortHashMapWithHashingStrategy<K>
select(ObjectShortPredicate<? super K> predicate)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.select.

Return a copy of this map containing only the key/value pairs that match the predicate.

public MutableShortCollection
select(ShortPredicate predicate)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.select.

Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.

public MutableShortIterator
shortIterator()

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.shortIterator.

Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

private int
pack-priv int
spread(Object element)

public long
public short[]
toArray()

Implements org.eclipse.collections.api.ShortIterable.toArray.

Converts the ShortIterable to a primitive short array.

public short[]
toArray(short[] target)

Overrides default org.eclipse.collections.api.ShortIterable.toArray.

Converts the ShortIterable to a primitive short array.

public MutableShortBag
toBag()

Implements org.eclipse.collections.api.ShortIterable.toBag.

Converts the ShortIterable to a new MutableShortBag.

public ImmutableObjectShortMap<K>
toImmutable()

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.toImmutable.

Returns a copy of this map that is immutable (if this map is mutable) or itself if it is already immutable.

public MutableShortList
toList()

Implements org.eclipse.collections.api.ShortIterable.toList.

Converts the ShortIterable to a new MutableShortList.

private K
private static Object
public MutableShortSet
toSet()

Implements org.eclipse.collections.api.ShortIterable.toSet.

Converts the ShortIterable to a new MutableShortSet.

public short[]
public MutableShortList
public String
public boolean
public short
updateValue(K key, short initialValueIfAbsent, ShortToShortFunction function)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.updateValue.

Updates or sets the value associated with the key by applying the function to the existing value, if one exists, or to the specified initial value if one does not.

public void
public MutableShortCollection
values()

Implements org.eclipse.collections.api.map.primitive.ObjectShortMap.values.

Returns the values in this map as a separate collection.

public ObjectShortHashMapWithHashingStrategy<K>
withKeysValues(K key1, short value1, K key2, short value2)

public ObjectShortHashMapWithHashingStrategy<K>
withKeysValues(K key1, short value1, K key2, short value2, K key3, short value3)

public ObjectShortHashMapWithHashingStrategy<K>
withKeysValues(K key1, short value1, K key2, short value2, K key3, short value3, K key4, short value4)

public ObjectShortHashMapWithHashingStrategy<K>
withKeyValue(K key1, short value1)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.withKeyValue.

Associates a value with the specified key.

public ObjectShortHashMapWithHashingStrategy<K>
withoutAllKeys(Iterable<? extends K> keys)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.withoutAllKeys.

Removes the mappings associated with all the keys, if they exist, from this map.

public ObjectShortHashMapWithHashingStrategy<K>
withoutKey(K key)

Implements org.eclipse.collections.api.map.primitive.MutableObjectShortMap.withoutKey.

Removes the mapping associated with the key, if one exists, from this map.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait