|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILevel0MapSelectedOperator<I,K,V>
Method Summary | |
---|---|
ILevel0MapOperator<I,K,V> |
endIf()
Ends the selection currently active for this level. |
ILevel0MapSelectedOperator<I,K,V> |
execAsMap(IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)
Executes the specified function on the target object, creating a new map operator containing the result of the execution. |
ILevel1MapSelectedEntriesOperator<I,K,V> |
forEachEntry()
Iterates the target map's entries. |
ILevel0MapSelectedOperator<I,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. |
ILevel0MapSelectedOperator<I,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. |
ILevel0MapSelectedOperator<I,K,V> |
put(K newKey,
V newValue)
Adds a new entry with the specified key and value at the end of the target map. |
ILevel0MapSelectedOperator<I,K,V> |
putAll(Map<K,V> map)
Adds all the entries in the specified map to the target map. |
ILevel0MapSelectedOperator<I,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. |
ILevel0MapSelectedOperator<I,K,V> |
removeAllKeys(K... keys)
Removes from the target map all entries which keys match the ones specified. |
ILevel0MapSelectedOperator<I,K,V> |
removeAllKeysNot(K... keys)
Removes from the target map all entries except those which keys match the ones specified. |
ILevel0MapSelectedOperator<I,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. |
ILevel0MapSelectedOperator<I,K,V> |
replaceWith(Map<K,V> replacement)
Replaces the current target object with the specified replacement. |
ILevel0MapSelectedOperator<I,K,V> |
sort()
Sorts the elements of the structure according to their natural ordering. |
ILevel0MapSelectedOperator<I,K,V> |
sort(Comparator<? super Map.Entry<K,V>> comparator)
Sorts the elements of the structure according to the order induced by the specified comparator. |
ILevel0MapSelectedOperator<I,K,V> |
sortBy(IFunction<? super Map.Entry<K,V>,?> by)
Sorts the elements of the structure according to the result of executing the specified function. |
Method Detail |
---|
ILevel0MapOperator<I,K,V> endIf()
SelectedOperator
Ends the selection currently active for this level.
endIf
in interface SelectedOperator<Map<K,V>>
ILevel1MapSelectedEntriesOperator<I,K,V> forEachEntry()
NavigableMapOperator
Iterates the target map's entries. After executing this method, any further operations will be applied on each of the map entries (java.util.Map.Entry,?> objects) until an "endFor()" method is called.
forEachEntry
in interface NavigableMapOperator<K,V>
ILevel0MapSelectedOperator<I,K,V> sort()
SortableOperator
Sorts the elements of the structure according to their natural ordering.
sort
in interface SortableOperator<Map.Entry<K,V>>
ILevel0MapSelectedOperator<I,K,V> sort(Comparator<? super Map.Entry<K,V>> comparator)
SortableOperator
Sorts the elements of the structure according to the order induced by the specified comparator.
sort
in interface SortableOperator<Map.Entry<K,V>>
comparator
- the comparator to be used.
ILevel0MapSelectedOperator<I,K,V> sortBy(IFunction<? super Map.Entry<K,V>,?> by)
SortableOperator
Sorts the elements of the structure according to the result of executing the specified function.
sortBy
in interface SortableOperator<Map.Entry<K,V>>
by
- the function to be executed in order to obtain the compared object
ILevel0MapSelectedOperator<I,K,V> put(K newKey, V newValue)
ModifiableMapOperator
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.
put
in interface ModifiableMapOperator<K,V>
newKey
- the key for the new entry to be addednewValue
- the value for the new entry to be added
ILevel0MapSelectedOperator<I,K,V> insert(int position, K newKey, V newValue)
ModifiableMapOperator
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.
insert
in interface ModifiableMapOperator<K,V>
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
ILevel0MapSelectedOperator<I,K,V> putAll(Map<K,V> map)
ModifiableMapOperator
Adds all the entries in the specified map to the target map.
The original target object is not modified, but copied instead.
putAll
in interface ModifiableMapOperator<K,V>
map
- the map containing the entries to be added.
ILevel0MapSelectedOperator<I,K,V> insertAll(int position, Map<K,V> map)
ModifiableMapOperator
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.
insertAll
in interface ModifiableMapOperator<K,V>
position
- the position into which the entries will be added.map
- the map containing the entries to be inserted.
ILevel0MapSelectedOperator<I,K,V> removeAllKeys(K... keys)
ModifiableMapOperator
Removes from the target map all entries which keys match the ones specified.
The original target object is not modified, but copied instead.
removeAllKeys
in interface ModifiableMapOperator<K,V>
keys
- the keys which have to be removed.
ILevel0MapSelectedOperator<I,K,V> removeAllTrue(IFunction<? super Map.Entry<K,V>,Boolean> eval)
ModifiableMapOperator
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.
removeAllTrue
in interface ModifiableMapOperator<K,V>
eval
- the evaluator to be used, which must return Boolean
ILevel0MapSelectedOperator<I,K,V> removeAllFalse(IFunction<? super Map.Entry<K,V>,Boolean> eval)
ModifiableMapOperator
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.
removeAllFalse
in interface ModifiableMapOperator<K,V>
eval
- the evaluator to be used, which must return Boolean
ILevel0MapSelectedOperator<I,K,V> removeAllKeysNot(K... keys)
ModifiableMapOperator
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.
removeAllKeysNot
in interface ModifiableMapOperator<K,V>
keys
- the keys which have to be kept.
ILevel0MapSelectedOperator<I,K,V> replaceWith(Map<K,V> replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ReplaceableOperator<Map<K,V>>
replacement
- the object which will replace the current target object.
ILevel0MapSelectedOperator<I,K,V> execAsMap(IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)
ExecutableMapSelectedOperator
Executes the specified function on the target object, creating a new map operator containing the result of the execution.
This function does not allow the operator target type to change because a selection ("if") has already been done on the target objects, and this would render the operator inconsistent (some objects would belong to a type and others to another type).
execAsMap
in interface ExecutableMapSelectedOperator<K,V>
function
- the function to be executed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |