| Modifier and Type | Method and Description |
|---|---|
| public short | Returns: Returns the current value associated withkey (after changes).The key of the value to adjust. key, short The value to put or add to the existing value if additionValue)key exists.An equivalent of calling putOrAdd(key, additionValue, additionValue); |
| public void | |
| public boolean | |
| public short | Returns: Returns the value associated with the given key or the default value for the value type, if the key is not associated with any value. For numeric value types, this default value is 0, for object types it isnull.
|
| public short | Returns: Returns the value associated with the given key or the provided default value if the key is not associated with any value.
|
| public int | Returns: A hash code of elements stored in the map. The hash code is defined as a sum of hash codes of keys and values stored within the set). Because sum is commutative, this ensures that different order of elements in a set does not affect the hash code.
|
| public boolean | Returns: Returnstrue if the index corresponds to an existing key or false
otherwise. This is equivalent to checking whether the index is a positive value (existing
keys) or a negative value (non-existing keys).The index of a given key, as returned from index)indexOf.
|
| public short | Returns: Returns the value currently associated with the key.The index of an existing key. index)Returns the value associated with an existing key. |
| public void | indexInsert(int
The index of a previously non-existing key, as returned from index, KType key, short value)indexOf.Inserts a key-value pair for a key that is not present in the map. |
| public int | Returns: A non-negative value of the logical "index" of the key in the map or a negative value if the key did not exist.The key to locate in the map. key)Returns a logical "index" of a given key that can be used to speed up follow-up value setters or getters in certain scenarios (conditional logic). |
| public short | Returns: Returns the previous value associated with the key.The index of the key to remove, as returned from index)indexOf.Removes a key-value pair at an index previously acquired from |
| public short | Returns: Returns the previous value associated with the key.The index of an existing key. index, short newValue)Replaces the value associated with an existing key and returns any previous value stored for that key. |
| public short | Returns: The value previously stored under the given key in the map is returned.Place a given key and value in the container. |
| public int | Returns: Returns the number of keys added to the map as a result of this call (not previously present in the map). Values of existing keys are overwritten.Puts all keys from another container to this map, replacing the values of existing keys, if such keys are present. |
| public int | Returns: Returns the number of keys added to the map as a result of this call (not previously present in the map). Values of existing keys are overwritten.Puts all keys from an iterable cursor to this map, replacing the values of existing keys, if such keys are present. |
| public default boolean | Returns: true if key did not exist and value was placed in the map,
false otherwise.If the specified key is not already associated with a value, associates it with the given value. |
| public short | Returns: Returns the current value associated withkey (after changes).The key of the value to adjust. key, short The value to put if putValue, short key does not exist.The value to add to the existing value if incrementValue)key exists.If |
| public void | |
| public short | |
| public String | Returns: Returns a sequence of characters where '.' depicts an empty fragment of the internal buffer and 'X' depicts full or nearly full capacity within the buffer's range and anything between 1 and 9 is between.The number of characters to "squeeze" the entire buffer into. characters)Visually depict the distribution of keys. |
| addTo | back to summary |
|---|---|
| public short addTo(KType key, short additionValue) An equivalent of calling putOrAdd(key, additionValue, additionValue);
| |
| clear | back to summary |
|---|---|
| public void clear() Clear all keys and values in the container.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Compares the specified object with this set for equality. Returns | |
| get | back to summary |
|---|---|
public short get(KType key)
| |
| getOrDefault | back to summary |
|---|---|
public short getOrDefault(KType key, short defaultValue)
| |
| hashCode | back to summary |
|---|---|
public int hashCode()
| |
| indexExists | back to summary |
|---|---|
public boolean indexExists(int index)
| |
| indexGet | back to summary |
|---|---|
| public short indexGet(int index) Returns the value associated with an existing key.
| |
| indexInsert | back to summary |
|---|---|
| public void indexInsert(int index, KType key, short value) Inserts a key-value pair for a key that is not present in the map. This method may help in avoiding double recalculation of the key's hash.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(KType key) Returns a logical "index" of a given key that can be used to speed up follow-up value setters or getters in certain scenarios (conditional logic). The semantics of "indexes" are not strictly defined. Indexes may (and typically won't be) contiguous. The index is valid only between map modifications (it will not be affected by read-only operations like iteration or value retrievals).
| |
| indexRemove | back to summary |
|---|---|
| public short indexRemove(int index) Removes a key-value pair at an index previously acquired from
| |
| indexReplace | back to summary |
|---|---|
| public short indexReplace(int index, short newValue) Replaces the value associated with an existing key and returns any previous value stored for that key.
| |
| put | back to summary |
|---|---|
| public short put(KType key, short value) Place a given key and value in the container.
| |
| putAll | back to summary |
|---|---|
| public int putAll(ObjectShortAssociativeContainer<? extends KType> container) Puts all keys from another container to this map, replacing the values of existing keys, if such keys are present.
| |
| putAll | back to summary |
|---|---|
| public int putAll(Iterable<? extends ObjectShortCursor<? extends KType>> iterable) Puts all keys from an iterable cursor to this map, replacing the values of existing keys, if such keys are present.
| |
| putIfAbsent | back to summary |
|---|---|
| public default boolean putIfAbsent(KType key, short value) If the specified key is not already associated with a value, associates it with the given value.
| |
| putOrAdd | back to summary |
|---|---|
| public short putOrAdd(KType key, short putValue, short incrementValue) If
| |
| release | back to summary |
|---|---|
| public void release() Removes all elements from the collection and additionally releases any internal buffers.
Typically, if the object is to be reused, a simple
| |
| remove | back to summary |
|---|---|
| public short remove(KType key) Remove all values at the given key. The default value for the key type is returned if the value does not exist in the map. | |
| visualizeKeyDistribution | back to summary |
|---|---|
| public String visualizeKeyDistribution(int characters) Visually depict the distribution of keys.
| |