@Generated(date="2017-07-11T19:16:24+0200",
value="KTypeVTypeMap.java")
public interface ShortIntMap
extends ShortIntAssociativeContainer
| Modifier and Type | Method and Description |
|---|---|
int |
addTo(short key,
int additionValue)
An equivalent of calling
putOrAdd(key, additionValue, additionValue);
|
void |
clear()
Clear all keys and values in the container.
|
int |
get(short key) |
int |
getDefaultValue()
Returns the "default value" value used in containers methods returning
"default value"
|
int |
put(short key,
int value)
Place a given key and value in the container.
|
int |
putAll(java.lang.Iterable<? extends ShortIntCursor> iterable)
Puts all keys from an iterable cursor to this map, replacing the values
of existing keys, if such keys are present.
|
int |
putAll(ShortIntAssociativeContainer container)
Puts all keys from another container to this map, replacing the values
of existing keys, if such keys are present.
|
boolean |
putIfAbsent(short key,
int value)
Trove-inspired API method.
|
int |
putOrAdd(short key,
int putValue,
int additionValue)
If
key exists, putValue is inserted into the map,
otherwise any existing value is incremented by additionValue. |
int |
remove(short key)
Remove the (key, value) pair associated with the given key, and returns the assocaited value.
|
void |
setDefaultValue(int defaultValue)
Set the "default value" value to be used in containers methods returning
"default value"
|
int put(short key,
int value)
boolean putIfAbsent(short key,
int value)
if (!map.containsKey(key))
map.put(key, value);
key - The key of the value to check.value - The value to put if key does not exist.true if key did not exist and value
was placed in the map.int putOrAdd(short key,
int putValue,
int additionValue)
key exists, putValue is inserted into the map,
otherwise any existing value is incremented by additionValue.key - The key of the value to adjust.putValue - The value to put if key does not exist.incrementValue - The value to add to the existing value if key exists.key (after
changes).int addTo(short key,
int additionValue)
putOrAdd(key, additionValue, additionValue);
key - The key of the value to adjust.additionValue - The value to put or add to the existing value if key
exists.key (after
changes).int get(short key)
int putAll(ShortIntAssociativeContainer container)
int putAll(java.lang.Iterable<? extends ShortIntCursor> iterable)
int remove(short key)
key - void clear()
int getDefaultValue()
void setDefaultValue(int defaultValue)
Copyright © 2017. All rights reserved.