@Generated(date="2015-05-05T11:00:03+0200", value="KTypeVTypeMap.java") public interface LongShortMap extends LongShortAssociativeContainer
Modifier and Type | Method and Description |
---|---|
short |
addTo(long key,
short additionValue)
An equivalent of calling
|
void |
clear()
Clear all keys and values in the container.
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this set for equality.
|
short |
get(long key) |
short |
getOrDefault(long key,
short defaultValue) |
int |
hashCode() |
boolean |
indexExists(int index) |
short |
indexGet(int index)
Returns the value associated with an existing key.
|
void |
indexInsert(int index,
long key,
short value)
Inserts a key-value pair for a key that is not present in the map.
|
int |
indexOf(long 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).
|
short |
indexReplace(int index,
short newValue)
Replaces the value associated with an existing key and returns any previous
value stored for that key.
|
short |
put(long key,
short value)
Place a given key and value in the container.
|
int |
putAll(java.lang.Iterable<? extends LongShortCursor> iterable)
Puts all keys from an iterable cursor to this map, replacing the values of
existing keys, if such keys are present.
|
int |
putAll(LongShortAssociativeContainer container)
Puts all keys from another container to this map, replacing the values of
existing keys, if such keys are present.
|
short |
putOrAdd(long key,
short putValue,
short incrementValue)
If
key exists, putValue is inserted into the map,
otherwise any existing value is incremented by additionValue . |
void |
release()
Removes all elements from the collection and additionally releases any
internal buffers.
|
short |
remove(long key)
Remove all values at the given key.
|
short get(long key)
short getOrDefault(long key, short defaultValue)
short put(long key, short value)
int putAll(LongShortAssociativeContainer container)
int putAll(java.lang.Iterable<? extends LongShortCursor> iterable)
short putOrAdd(long key, short putValue, short incrementValue)
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).short addTo(long key, short 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).short remove(long key)
boolean equals(java.lang.Object obj)
LongShortMap
and both objects contains exactly the same key-value
pairs.equals
in class java.lang.Object
int hashCode()
hashCode
in class java.lang.Object
int indexOf(long key)
key
- The key to locate in the map.indexExists(int)
,
indexGet(int)
,
indexInsert(int, long, short)
,
indexReplace(int, short)
boolean indexExists(int index)
index
- The index of a given key, as returned from indexOf(long)
.true
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).indexOf(long)
short indexGet(int index)
index
- The index of an existing key.java.lang.AssertionError
- If assertions are enabled and the index does not correspond to an
existing key.indexOf(long)
short indexReplace(int index, short newValue)
index
- The index of an existing key.java.lang.AssertionError
- If assertions are enabled and the index does not correspond to an
existing key.indexOf(long)
void indexInsert(int index, long key, short value)
index
- The index of a previously non-existing key, as returned from
indexOf(long)
.java.lang.AssertionError
- If assertions are enabled and the index corresponds to an
existing key.indexOf(long)
void clear()
release()
Copyright © 2015 Carrot Search s.c.. All Rights Reserved.