org.op4j.operators.qualities
Interface ExecutableListOperator<T>

All Known Subinterfaces:
ILevel0ListOperator<I,T>
All Known Implementing Classes:
Level0ListOperator, Level0ListOperator

public interface ExecutableListOperator<T>

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

Since:
1.0
Author:
Daniel Fernández

Method Summary
<X> Operator
exec(IFunction<? super List<T>,X> function)
           Executes the specified function on the target list, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified.
<X> ExecutableListOperator<X>
execAsList(IFunction<? super List<T>,? extends List<X>> function)
           Executes the specified function on the target object, creating a new list operator containing the result of the execution.
 ExecutableListOperator<T> execIfFalseAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<? extends T>> function)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
execIfFalseAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableListOperator<T> execIfNotNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
execIfNotNullAsList(IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableListOperator<T> execIfNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
execIfNullAsList(IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableListOperator<T> execIfTrueAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<? extends T>> function)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
execIfTrueAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
           Executes a function in a way equivalent to execAsList(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
map(IFunction<? super T,X> function)
           Executes the specified function on each of the elements, creating a new list operator containing the result of all the executions and setting the new operator type to the one resulting from the function execution.
 ExecutableListOperator<T> mapIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
mapIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableListOperator<T> mapIfNotNull(IFunction<? super T,? extends T> function)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
mapIfNotNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableListOperator<T> mapIfNull(IFunction<? super T,? extends T> function)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
mapIfNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableListOperator<T> mapIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableListOperator<X>
mapIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Maps a function in a way equivalent to map(IFunction) but only on selected elements, leaving all other elements untouched.
 

Method Detail

execAsList

<X> ExecutableListOperator<X> execAsList(IFunction<? super List<T>,? extends List<X>> function)

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

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

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

execIfNotNullAsList

ExecutableListOperator<T> execIfNotNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)

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

execIfNullAsList

ExecutableListOperator<T> execIfNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)

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

execIfTrueAsList

ExecutableListOperator<T> execIfTrueAsList(IFunction<? super List<T>,Boolean> eval,
                                           IFunction<? super List<T>,? extends List<? extends T>> function)

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

execIfFalseAsList

ExecutableListOperator<T> execIfFalseAsList(IFunction<? super List<T>,Boolean> eval,
                                            IFunction<? super List<T>,? extends List<? extends T>> function)

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

execIfNotNullAsList

<X> ExecutableListOperator<X> execIfNotNullAsList(IFunction<? super List<T>,? extends List<X>> function,
                                                  IFunction<? super List<T>,? extends List<X>> elseFunction)

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

Type Parameters:
X - the new type 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

execIfNullAsList

<X> ExecutableListOperator<X> execIfNullAsList(IFunction<? super List<T>,? extends List<X>> function,
                                               IFunction<? super List<T>,? extends List<X>> elseFunction)

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

Type Parameters:
X - the new type 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

execIfTrueAsList

<X> ExecutableListOperator<X> execIfTrueAsList(IFunction<? super List<T>,Boolean> eval,
                                               IFunction<? super List<T>,? extends List<X>> function,
                                               IFunction<? super List<T>,? extends List<X>> elseFunction)

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

Type Parameters:
X - the new type 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

execIfFalseAsList

<X> ExecutableListOperator<X> execIfFalseAsList(IFunction<? super List<T>,Boolean> eval,
                                                IFunction<? super List<T>,? extends List<X>> function,
                                                IFunction<? super List<T>,? extends List<X>> elseFunction)

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

Type Parameters:
X - the new type 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

exec

<X> Operator exec(IFunction<? super List<T>,X> function)

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

map

<X> ExecutableListOperator<X> map(IFunction<? super T,X> function)

Executes the specified function on each of the elements, creating a new list operator containing the result of all the executions and setting the new operator type to the one resulting from the function execution.

This method is equivalent to forEach().exec(function).endFor().

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

mapIfNotNull

ExecutableListOperator<T> mapIfNotNull(IFunction<? super T,? extends T> function)

Maps a function in a way equivalent to map(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

mapIfNull

ExecutableListOperator<T> mapIfNull(IFunction<? super T,? extends T> function)

Maps a function in a way equivalent to map(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

mapIfTrue

ExecutableListOperator<T> mapIfTrue(IFunction<? super T,Boolean> eval,
                                    IFunction<? super T,? extends T> function)

Maps a function in a way equivalent to map(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

mapIfFalse

ExecutableListOperator<T> mapIfFalse(IFunction<? super T,Boolean> eval,
                                     IFunction<? super T,? extends T> function)

Maps a function in a way equivalent to map(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

mapIfNotNull

<X> ExecutableListOperator<X> mapIfNotNull(IFunction<? super T,X> function,
                                           IFunction<? super T,X> elseFunction)

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

Type Parameters:
X - the new type 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

mapIfNull

<X> ExecutableListOperator<X> mapIfNull(IFunction<? super T,X> function,
                                        IFunction<? super T,X> elseFunction)

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

Type Parameters:
X - the new type 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

mapIfTrue

<X> ExecutableListOperator<X> mapIfTrue(IFunction<? super T,Boolean> eval,
                                        IFunction<? super T,X> function,
                                        IFunction<? super T,X> elseFunction)

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

Type Parameters:
X - the new type 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

mapIfFalse

<X> ExecutableListOperator<X> mapIfFalse(IFunction<? super T,Boolean> eval,
                                         IFunction<? super T,X> function,
                                         IFunction<? super T,X> elseFunction)

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

Type Parameters:
X - the new type 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.