java.lang.Iterable<KType>, ObjectCharAssociativeContainer<KType>ObjectCharHashMap, ObjectCharIdentityHashMap, ObjectCharScatterMap@Generated(date="2018-05-21T12:24:06+0200", value="KTypeVTypeMap.java") public interface ObjectCharMap<KType> extends ObjectCharAssociativeContainer<KType>
| Modifier and Type | Method | Description |
|---|---|---|
char |
addTo(KType key,
char 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.
|
char |
get(KType key) |
|
char |
getOrDefault(KType key,
char defaultValue) |
|
int |
hashCode() |
|
boolean |
indexExists(int index) |
|
char |
indexGet(int index) |
Returns the value associated with an existing key.
|
void |
indexInsert(int index,
KType key,
char value) |
Inserts a key-value pair for a key that is not present in the map.
|
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).
|
char |
indexReplace(int index,
char newValue) |
Replaces the value associated with an existing key and returns any previous
value stored for that key.
|
char |
put(KType key,
char value) |
Place a given key and value in the container.
|
int |
putAll(ObjectCharAssociativeContainer<? extends KType> container) |
Puts all keys from another container to this map, replacing the values of
existing keys, if such keys are present.
|
int |
putAll(java.lang.Iterable<? extends ObjectCharCursor<? extends KType>> iterable) |
Puts all keys from an iterable cursor to this map, replacing the values of
existing keys, if such keys are present.
|
char |
putOrAdd(KType key,
char putValue,
char 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.
|
char |
remove(KType key) |
Remove all values at the given key.
|
java.lang.String |
visualizeKeyDistribution(int characters) |
Visually depict the distribution of keys.
|
char get(KType key)
null.char getOrDefault(KType key, char defaultValue)
char put(KType key, char value)
int putAll(ObjectCharAssociativeContainer<? extends KType> container)
int putAll(java.lang.Iterable<? extends ObjectCharCursor<? extends KType>> iterable)
char putOrAdd(KType key, char putValue, char 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).char addTo(KType key, char 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).char remove(KType key)
boolean equals(java.lang.Object obj)
ObjectCharMap and both objects contains exactly the same key-value
pairs.equals in class java.lang.Objectint hashCode()
hashCode in class java.lang.Objectint indexOf(KType key)
key - The key to locate in the map.indexExists(int),
indexGet(int),
indexInsert(int, KType, char),
indexReplace(int, char)boolean indexExists(int index)
index - The index of a given key, as returned from indexOf(KType).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(KType)char 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(KType)char indexReplace(int index,
char 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(KType)void indexInsert(int index,
KType key,
char value)
index - The index of a previously non-existing key, as returned from
indexOf(KType).java.lang.AssertionError - If assertions are enabled and the index corresponds to an
existing key.indexOf(KType)void clear()
release()void release()
clear() should be a better alternative since it'll avoid
reallocation.clear()java.lang.String visualizeKeyDistribution(int characters)
characters - The number of characters to "squeeze" the entire buffer into.Copyright © 2018 Carrot Search s.c.. All Rights Reserved.