org.op4j.operators.intf.map
Interface ILevel2MapSelectedEntriesKeySelectedOperator<I,K,V>

All Superinterfaces:
ExecutableSelectedOperator<K>, Operator, ReplaceableOperator<K>, SelectedMapEntryComponentOperator<K>, UniqOperator<Map<K,V>>
All Known Implementing Classes:
Level2MapSelectedEntriesKeySelectedOperator, Level2MapSelectedEntriesKeySelectedOperator

public interface ILevel2MapSelectedEntriesKeySelectedOperator<I,K,V>
extends UniqOperator<Map<K,V>>, ExecutableSelectedOperator<K>, ReplaceableOperator<K>, SelectedMapEntryComponentOperator<K>

Since:
1.0
Author:
Daniel Fernández

Method Summary
 ILevel2MapSelectedEntriesKeyOperator<I,K,V> endIf()
           Ends the selection currently active for this level.
 ILevel2MapSelectedEntriesKeySelectedOperator<I,K,V> exec(IFunction<? super K,? extends K> function)
           Executes the specified function on the target object, creating a new operator containing the result of the execution.
 ILevel2MapSelectedEntriesKeySelectedOperator<I,K,V> replaceWith(K replacement)
           Replaces the current target object with the specified replacement.
 

Method Detail

endIf

ILevel2MapSelectedEntriesKeyOperator<I,K,V> endIf()
Description copied from interface: SelectedMapEntryComponentOperator

Ends the selection currently active for this level.

Specified by:
endIf in interface SelectedMapEntryComponentOperator<K>
Returns:
an operator which will execute all subsequent operations on all the target objects instead of only on the previously selected ones.

replaceWith

ILevel2MapSelectedEntriesKeySelectedOperator<I,K,V> replaceWith(K replacement)
Description copied from interface: ReplaceableOperator

Replaces the current target object with the specified replacement.

Specified by:
replaceWith in interface ReplaceableOperator<K>
Parameters:
replacement - the object which will replace the current target object.
Returns:
an operator containing the replacement object as target.

exec

ILevel2MapSelectedEntriesKeySelectedOperator<I,K,V> exec(IFunction<? super K,? extends K> function)
Description copied from interface: ExecutableSelectedOperator

Executes the specified function on the target object, creating a new 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).

Specified by:
exec in interface ExecutableSelectedOperator<K>
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution


Copyright © 2012 The OP4J team. All Rights Reserved.