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

All Known Subinterfaces:
ILevel1MapEntriesOperator<I,K,V>
All Known Implementing Classes:
Level1MapEntriesOperator, Level1MapEntriesOperator

public interface ExecutableMapEntryOperator<K,V>

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

Since:
1.0
Author:
Daniel Fernández

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

Method Detail

execAsMapEntry

<X,Y> ExecutableMapEntryOperator<X,Y> execAsMapEntry(IFunction<? super Map.Entry<K,V>,? extends Map.Entry<X,Y>> function)

Executes the specified function on the target object, creating a new map entry 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.Entry<K,V>,X> function)

Executes the specified function on the target map entry, 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

execIfTrueAsMapEntry

ExecutableMapEntryOperator<K,V> execIfTrueAsMapEntry(IFunction<? super Map.Entry<K,V>,Boolean> eval,
                                                     IFunction<? super Map.Entry<K,V>,? extends Map.Entry<? extends K,? extends V>> function)

Executes a function in a way equivalent to execAsMapEntry(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

execIfFalseAsMapEntry

ExecutableMapEntryOperator<K,V> execIfFalseAsMapEntry(IFunction<? super Map.Entry<K,V>,Boolean> eval,
                                                      IFunction<? super Map.Entry<K,V>,? extends Map.Entry<? extends K,? extends V>> function)

Executes a function in a way equivalent to execAsMapEntry(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

execIfTrueAsMapEntry

<X,Y> ExecutableMapEntryOperator<X,Y> execIfTrueAsMapEntry(IFunction<? super Map.Entry<K,V>,Boolean> eval,
                                                           IFunction<? super Map.Entry<K,V>,? extends Map.Entry<X,Y>> function,
                                                           IFunction<? super Map.Entry<K,V>,? extends Map.Entry<X,Y>> elseFunction)

Executes a function in a way equivalent to execAsMapEntry(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

execIfFalseAsMapEntry

<X,Y> ExecutableMapEntryOperator<X,Y> execIfFalseAsMapEntry(IFunction<? super Map.Entry<K,V>,Boolean> eval,
                                                            IFunction<? super Map.Entry<K,V>,? extends Map.Entry<X,Y>> function,
                                                            IFunction<? super Map.Entry<K,V>,? extends Map.Entry<X,Y>> elseFunction)

Executes a function in a way equivalent to execAsMapEntry(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.