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

All Known Subinterfaces:
ILevel0SetOperator<I,T>
All Known Implementing Classes:
Level0SetOperator, Level0SetOperator

public interface ExecutableSetOperator<T>

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

Since:
1.0
Author:
Daniel Fernández

Method Summary
<X> Operator
exec(IFunction<? super Set<T>,X> function)
           Executes the specified function on the target set, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified.
<X> ExecutableSetOperator<X>
execAsSet(IFunction<? super Set<T>,? extends Set<X>> function)
           Executes the specified function on the target set, creating a new set operator containing the result of the execution.
 ExecutableSetOperator<T> execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<? extends T>> function)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableSetOperator<X>
execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableSetOperator<T> execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableSetOperator<X>
execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableSetOperator<T> execIfNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableSetOperator<X>
execIfNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableSetOperator<T> execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<? extends T>> function)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableSetOperator<X>
execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
           Executes a function in a way equivalent to execAsSet(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableSetOperator<X>
map(IFunction<? super T,X> function)
           Executes the specified function on each of the elements, creating a new operator containing the result of all the executions and setting the new operator type to the one resulting from the function execution.
 ExecutableSetOperator<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> ExecutableSetOperator<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.
 ExecutableSetOperator<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> ExecutableSetOperator<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.
 ExecutableSetOperator<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> ExecutableSetOperator<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.
 ExecutableSetOperator<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> ExecutableSetOperator<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

execAsSet

<X> ExecutableSetOperator<X> execAsSet(IFunction<? super Set<T>,? extends Set<X>> function)

Executes the specified function on the target set, creating a new set 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 result elements
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution

execIfNotNullAsSet

ExecutableSetOperator<T> execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)

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

execIfNullAsSet

ExecutableSetOperator<T> execIfNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)

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

execIfTrueAsSet

ExecutableSetOperator<T> execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval,
                                         IFunction<? super Set<T>,? extends Set<? extends T>> function)

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

execIfFalseAsSet

ExecutableSetOperator<T> execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval,
                                          IFunction<? super Set<T>,? extends Set<? extends T>> function)

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

execIfNotNullAsSet

<X> ExecutableSetOperator<X> execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function,
                                                IFunction<? super Set<T>,? extends Set<X>> elseFunction)

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

execIfNullAsSet

<X> ExecutableSetOperator<X> execIfNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function,
                                             IFunction<? super Set<T>,? extends Set<X>> elseFunction)

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

execIfTrueAsSet

<X> ExecutableSetOperator<X> execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval,
                                             IFunction<? super Set<T>,? extends Set<X>> function,
                                             IFunction<? super Set<T>,? extends Set<X>> elseFunction)

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

execIfFalseAsSet

<X> ExecutableSetOperator<X> execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval,
                                              IFunction<? super Set<T>,? extends Set<X>> function,
                                              IFunction<? super Set<T>,? extends Set<X>> elseFunction)

Executes a function in a way equivalent to execAsSet(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 Set<T>,X> function)

Executes the specified function on the target set, 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> ExecutableSetOperator<X> map(IFunction<? super T,X> function)

Executes the specified function on each of the elements, creating a new 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

ExecutableSetOperator<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

ExecutableSetOperator<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

ExecutableSetOperator<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

ExecutableSetOperator<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> ExecutableSetOperator<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> ExecutableSetOperator<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> ExecutableSetOperator<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> ExecutableSetOperator<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.