| Modifier and Type | Method and Description |
|---|---|
| public MutableCharObjectMap | Returns: a synchronized view of this mapReturns a synchronized view of this map, delegating all operations to this map but ensuring only one caller has access to the map at a time. |
| public MutableCharObjectMap | Returns: an unmodifiable view of this mapReturns an unmodifiable view of this map, delegating all read-only operations to this
map and throwing an |
| public MutableObjectCharMap | flipUniqueValues()
Redeclares org. Return the ObjectCharMap that is obtained by flipping the direction of this map and making the associations from value to key. |
| public V | Returns: the value associated with key, if one exists, orvalue if notthe key key, V the value to associate with value)key if no such mapping existsRetrieves the value associated with the key if one exists; if it does not, associates a value with the key. |
| public V | Returns: the value associated with the key, if one exists, or the result of invokingfunction if notthe key key, Function0<? extends V> the supplier that provides the value if no mapping exists for function)keyRetrieves the value associated with the key if one exists; if it does not, invokes the supplier and associates the result with the key. |
| public < the type of the value function's P> Vparameter | Returns: the value associated with the key, if one exists, or the result of invokingfunction with parameter if notthe key key, Function<? super P, ? extends V> the function that provides the value if no mapping exists.
The specified function, P parameter will be passed as the argument to the function.the parameter to provide to parameter)function if no value
exists for keyRetrieves 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 V | Returns: the value associated with the key, if one exists, or the result of invokingfunction with key if notthe key key, CharToObjectFunction<? extends V> the function that provides the value if no mapping exists.
The function)key will be passed as the argument to the function.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 V | Returns: the value previously associated withkey if one existed, or
null if notthe key key, V the value to associate with value)valueAssociates a value with the specified key. |
| public void | putAll(CharObjectMap<? extends V>
the map to copy into this map map)Puts all of the key/value mappings from the specified map into this map. |
| public default V | putPair(CharObjectPair<V> keyValuePair)
This method allows MutableCharObjectMap the ability to add an element in the form of |
| public MutableCharObjectMap | reject(CharObjectPredicate<? super V> predicate)
Redeclares org. Return a copy of this map containing only the key/value pairs that do not match the predicate. |
| public V | remove(char
the key to remove key)Removes the mapping associated with the key, if one exists, from the map. |
| public boolean | Returns: true if any entry is removed.should return true if the key/value pair should be removed. predicate)Remove an entry from the map if the |
| public V | removeKey(char
the key to remove key)Removes the mapping associated with the key, if one exists, from the map. |
| public MutableCharObjectMap | select(CharObjectPredicate<? super V> predicate)
Redeclares org. Return a copy of this map containing only the key/value pairs that match the predicate. |
| public MutableCharObjectMap | tap(Procedure<? super V> procedure)
Redeclares org. Executes the Procedure for each element in the iterable and returns |
| public V | updateValue(char key, Function0<? extends V> factory, Function<? super V, ? extends V> function)
Look up the value associated with |
| public < the type of the value function's P> Vparameter | Returns: the new value associated with the key, either as a result of applyingfunction to the value already associated with the key or as a result of
applying it to the value returned by factory and associating the result
with keythe key key, Function0<? extends V> the supplier providing the initial value to the function if no
mapping exists for the key factory, Function2<? super V, ? super P, ? extends V> the function that returns the updated value based on the current
value or the initial value, if no value exists. The specified function, P parameter
will also be passed as the second argument to the function.the parameter to provide to parameter)function if no value
exists for keyUpdates or sets the value associated with the key by applying the function to the existing value, if one exists, or the initial value supplied by the factory if one does not. |
| public default MutableCharObjectMap | Returns: this mapthe pairs to put into this map keyValuePairs)Puts all of the key/value mappings from the specified pairs into this map. |
| public MutableCharObjectMap | Returns: this mapthe key key, V the value to associate with value)valueAssociates a value with the specified key. |
| public MutableCharObjectMap | Returns: this mapthe keys to remove keys)Removes the mappings associated with all the keys, if they exist, from this map. |
| public MutableCharObjectMap | Returns: this mapthe key to remove key)Removes the mapping associated with the key, if one exists, from this map. |
| asSynchronized | back to summary |
|---|---|
| public MutableCharObjectMap Returns a synchronized view of this map, delegating all operations to this map but ensuring only one caller has access to the map at a time.
| |
| asUnmodifiable | back to summary |
|---|---|
| public MutableCharObjectMap Returns an unmodifiable view of this map, delegating all read-only operations to this
map and throwing an
| |
| flipUniqueValues | back to summary |
|---|---|
| public MutableObjectCharMap Redeclares org. Doc from org. Return the ObjectCharMap that is obtained by flipping the direction of this map and making the associations from value to key.
| |
| getIfAbsentPut | back to summary |
|---|---|
| public V getIfAbsentPut(char key, V value) Retrieves the value associated with the key if one exists; if it does not, associates a value with the key.
| |
| getIfAbsentPut | back to summary |
|---|---|
| public V getIfAbsentPut(char key, Function0<? extends V> function) Retrieves the value associated with the key if one exists; if it does not, invokes the supplier and associates the result with the key.
| |
| getIfAbsentPutWith | back to summary |
|---|---|
| public <P> V getIfAbsentPutWith(char key, Function<? super P, ? extends V> function, P parameter) 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.
| |
| getIfAbsentPutWithKey | back to summary |
|---|---|
| public V getIfAbsentPutWithKey(char key, CharToObjectFunction<? extends V> function) 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.
| |
| put | back to summary |
|---|---|
| public V put(char key, V value) Associates a value with the specified key. If a value is already associated
with the key in this map, it will be replaced with
| |
| putAll | back to summary |
|---|---|
| public void putAll(CharObjectMap<? extends V> map) Puts all of the key/value mappings from the specified map into this map. If this
map already has a value associated with one of the keys in the map, it will be
replaced with the value in
| |
| putPair | back to summary |
|---|---|
| public default V putPair(CharObjectPair<V> keyValuePair) This method allows MutableCharObjectMap the ability to add an element in the form of
| |
| reject | back to summary |
|---|---|
| public MutableCharObjectMap Redeclares org. Doc from org. Return a copy of this map containing only the key/value pairs that do not match the predicate.
| |
| remove | back to summary |
|---|---|
| public V remove(char key) Removes the mapping associated with the key, if one exists, from the map.
| |
| removeIf | back to summary |
|---|---|
| public boolean removeIf(CharObjectPredicate<? super V> predicate) Remove an entry from the map if the
| |
| removeKey | back to summary |
|---|---|
| public V removeKey(char key) Removes the mapping associated with the key, if one exists, from the map.
| |
| select | back to summary |
|---|---|
| public MutableCharObjectMap Redeclares org. Doc from org. Return a copy of this map containing only the key/value pairs that match the predicate.
| |
| tap | back to summary |
|---|---|
| public MutableCharObjectMap Redeclares org. Doc from org. Executes the Procedure for each element in the iterable and returns Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
| |
| updateValue | back to summary |
|---|---|
| public V updateValue(char key, Function0<? extends V> factory, Function<? super V, ? extends V> function) Look up the value associated with | |
| updateValueWith | back to summary |
|---|---|
| public <P> V updateValueWith(char key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter) Updates or sets the value associated with the key by applying the function to the existing value, if one exists, or the initial value supplied by the factory if one does not.
| |
| withAllKeyValues | back to summary |
|---|---|
| public default MutableCharObjectMap Puts all of the key/value mappings from the specified pairs into this map. If this map already has a value associated with one of the keys in the pairs, it will be replaced with the value in the pair.
| |
| withKeyValue | back to summary |
|---|---|
| public MutableCharObjectMap Associates a value with the specified key. If a value is already associated
with the key in this map, it will be replaced with
| |
| withoutAllKeys | back to summary |
|---|---|
| public MutableCharObjectMap Removes the mappings associated with all the keys, if they exist, from this map.
| |
| withoutKey | back to summary |
|---|---|
| public MutableCharObjectMap Removes the mapping associated with the key, if one exists, from this map.
| |