|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModifiableMapOperator<K,V>
This interface contains methods for modifying maps (adding/removing elements).
Method Summary | |
---|---|
ModifiableMapOperator<K,V> |
insert(int position,
K newKey,
V newValue)
Inserts a new entry with the specified key and value into the specified position (starting in 0) of the target map. |
ModifiableMapOperator<K,V> |
insertAll(int position,
Map<K,V> map)
Inserts all the entries in the specified map to the target map, in the specified position. |
ModifiableMapOperator<K,V> |
put(K newKey,
V newValue)
Adds a new entry with the specified key and value at the end of the target map. |
ModifiableMapOperator<K,V> |
putAll(Map<K,V> map)
Adds all the entries in the specified map to the target map. |
ModifiableMapOperator<K,V> |
removeAllFalse(IFunction<? super Map.Entry<K,V>,Boolean> eval)
Removes from the target map all the entries which evaluate as false using the specified evaluator. |
ModifiableMapOperator<K,V> |
removeAllKeys(K... keys)
Removes from the target map all entries which keys match the ones specified. |
ModifiableMapOperator<K,V> |
removeAllKeysNot(K... keys)
Removes from the target map all entries except those which keys match the ones specified. |
ModifiableMapOperator<K,V> |
removeAllTrue(IFunction<? super Map.Entry<K,V>,Boolean> eval)
Removes from the target map all the entries which evaluate as true using the specified evaluator. |
Method Detail |
---|
ModifiableMapOperator<K,V> put(K newKey, V newValue)
Adds a new entry with the specified key and value at the end of the target map.
The original target object is not modified, but copied instead.
newKey
- the key for the new entry to be addednewValue
- the value for the new entry to be added
ModifiableMapOperator<K,V> insert(int position, K newKey, V newValue)
Inserts a new entry with the specified key and value into the specified position (starting in 0) of the target map.
The original target object is not modified, but copied instead.
position
- the position into which the new entry will be insertednewKey
- the key for the new entry to be insertnewValue
- the value for the new entry to be insert
ModifiableMapOperator<K,V> putAll(Map<K,V> map)
Adds all the entries in the specified map to the target map.
The original target object is not modified, but copied instead.
map
- the map containing the entries to be added.
ModifiableMapOperator<K,V> insertAll(int position, Map<K,V> map)
Inserts all the entries in the specified map to the target map, in the specified position.
The original target object is not modified, but copied instead.
position
- the position into which the entries will be added.map
- the map containing the entries to be inserted.
ModifiableMapOperator<K,V> removeAllKeys(K... keys)
Removes from the target map all entries which keys match the ones specified.
The original target object is not modified, but copied instead.
keys
- the keys which have to be removed.
ModifiableMapOperator<K,V> removeAllTrue(IFunction<? super Map.Entry<K,V>,Boolean> eval)
Removes from the target map all the entries which evaluate as true using the specified evaluator.
The original target object is not modified, but copied instead.
eval
- the evaluator to be used, which must return Boolean
ModifiableMapOperator<K,V> removeAllFalse(IFunction<? super Map.Entry<K,V>,Boolean> eval)
Removes from the target map all the entries which evaluate as false using the specified evaluator.
The original target object is not modified, but copied instead.
eval
- the evaluator to be used, which must return Boolean
ModifiableMapOperator<K,V> removeAllKeysNot(K... keys)
Removes from the target map all entries except those which keys match the ones specified.
The original target object is not modified, but copied instead.
keys
- the keys which have to be kept.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |