org.op4j.operators.qualities
Interface ExecutableMapOperator<K,V>

All Known Subinterfaces:
ILevel0BuildingMapOperator<I,K,V>, ILevel0MapOperator<I,K,V>
All Known Implementing Classes:
Level0BuildingMapOperator, Level0MapOperator, Level0MapOperator

public interface ExecutableMapOperator<K,V>

This interface contains methods for executing functions on operators with map target objects.

Since:
1.0
Author:
Daniel Fernández

Method Summary
<X> Operator
exec(IFunction<? super Map<K,V>,X> function)
           Executes the specified function on the target object, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified.
<X,Y> ExecutableMapOperator<X,Y>
execAsMap(IFunction<? super Map<K,V>,? extends Map<X,Y>> function)
           Executes the specified function on the target map, creating a new map operator containing the result of the execution.
 ExecutableMapOperator<K,V> execIfFalseAsMap(IFunction<? super Map<K,V>,Boolean> eval, IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
<X,Y> ExecutableMapOperator<X,Y>
execIfFalseAsMap(IFunction<? super Map<K,V>,Boolean> eval, IFunction<? super Map<K,V>,? extends Map<X,Y>> function, IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableMapOperator<K,V> execIfNotNullAsMap(IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
<X,Y> ExecutableMapOperator<X,Y>
execIfNotNullAsMap(IFunction<? super Map<K,V>,? extends Map<X,Y>> function, IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableMapOperator<K,V> execIfNullAsMap(IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
<X,Y> ExecutableMapOperator<X,Y>
execIfNullAsMap(IFunction<? super Map<K,V>,? extends Map<X,Y>> function, IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableMapOperator<K,V> execIfTrueAsMap(IFunction<? super Map<K,V>,Boolean> eval, IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
<X,Y> ExecutableMapOperator<X,Y>
execIfTrueAsMap(IFunction<? super Map<K,V>,Boolean> eval, IFunction<? super Map<K,V>,? extends Map<X,Y>> function, IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)
           Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.
 

Method Detail

execAsMap

<X,Y> ExecutableMapOperator<X,Y> execAsMap(IFunction<? super Map<K,V>,? extends Map<X,Y>> function)

Executes the specified function on the target map, creating a new map operator containing the result of the execution.

This function must be able to take as input an object of the current operator's target type, and will return an object of a different type but same structure, which will be from then on the new operator's target type.

Type Parameters:
X - the type of the resulting keys
Y - the type of the resulting values
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution

exec

<X> Operator exec(IFunction<? super Map<K,V>,X> function)

Executes the specified function on the target object, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified.

Type Parameters:
X - the type of the result object
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution

execIfNotNullAsMap

ExecutableMapOperator<K,V> execIfNotNullAsMap(IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfNullAsMap

ExecutableMapOperator<K,V> execIfNullAsMap(IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfTrueAsMap

ExecutableMapOperator<K,V> execIfTrueAsMap(IFunction<? super Map<K,V>,Boolean> eval,
                                           IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfFalseAsMap

ExecutableMapOperator<K,V> execIfFalseAsMap(IFunction<? super Map<K,V>,Boolean> eval,
                                            IFunction<? super Map<K,V>,? extends Map<? extends K,? extends V>> function)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfNotNullAsMap

<X,Y> ExecutableMapOperator<X,Y> execIfNotNullAsMap(IFunction<? super Map<K,V>,? extends Map<X,Y>> function,
                                                    IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Type Parameters:
X - the new type of the keys returned by the functions
Y - the new type of the values returned by the functions
Parameters:
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfNullAsMap

<X,Y> ExecutableMapOperator<X,Y> execIfNullAsMap(IFunction<? super Map<K,V>,? extends Map<X,Y>> function,
                                                 IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Type Parameters:
X - the new type of the keys returned by the functions
Y - the new type of the values returned by the functions
Parameters:
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfTrueAsMap

<X,Y> ExecutableMapOperator<X,Y> execIfTrueAsMap(IFunction<? super Map<K,V>,Boolean> eval,
                                                 IFunction<? super Map<K,V>,? extends Map<X,Y>> function,
                                                 IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Type Parameters:
X - the new type of the keys returned by the functions
Y - the new type of the values returned by the functions
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfFalseAsMap

<X,Y> ExecutableMapOperator<X,Y> execIfFalseAsMap(IFunction<? super Map<K,V>,Boolean> eval,
                                                  IFunction<? super Map<K,V>,? extends Map<X,Y>> function,
                                                  IFunction<? super Map<K,V>,? extends Map<X,Y>> elseFunction)

Executes a function in a way equivalent to execAsMap(IFunction) but only on selected elements, leaving all other elements untouched.

Type Parameters:
X - the new type of the keys returned by the functions
Y - the new type of the values returned by the functions
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution


Copyright © 2012 The OP4J team. All Rights Reserved.