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

All Known Subinterfaces:
ILevel1ArrayElementsOperator<I,T>
All Known Implementing Classes:
Level1ArrayElementsOperator, Level1ArrayElementsOperator

public interface ExecutableArrayElementsOperator<T>

This interface contains methods for executing functions.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 ExecutableArrayElementsOperator<T> exec(IFunction<? super T,? extends T> function)
           Executes the specified function on the target object, creating a new operator containing the result of the execution as a new array.
<X> ExecutableArrayElementsOperator<X>
exec(org.javaruntype.type.Type<X> type, IFunction<? super T,X> function)
           Executes the specified function on the target object, creating a new array containing the result of the execution.
 ExecutableArrayElementsOperator<T> execIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableArrayElementsOperator<X>
execIfFalse(org.javaruntype.type.Type<X> type, IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableArrayElementsOperator<T> execIfIndex(int[] indexes, IFunction<? super T,? extends T> function)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableArrayElementsOperator<X>
execIfIndex(org.javaruntype.type.Type<X> type, int[] indexes, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableArrayElementsOperator<T> execIfIndexNot(int[] indexes, IFunction<? super T,? extends T> function)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableArrayElementsOperator<X>
execIfIndexNot(org.javaruntype.type.Type<X> type, int[] indexes, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableArrayElementsOperator<T> execIfNotNull(IFunction<? super T,? extends T> function)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableArrayElementsOperator<X>
execIfNotNull(org.javaruntype.type.Type<X> type, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableArrayElementsOperator<T> execIfNull(IFunction<? super T,? extends T> function)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableArrayElementsOperator<X>
execIfNull(org.javaruntype.type.Type<X> type, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ExecutableArrayElementsOperator<T> execIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ExecutableArrayElementsOperator<X>
execIfTrue(org.javaruntype.type.Type<X> type, IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
           Executes a function in a way equivalent to exec(IFunction) but only on selected elements, leaving all other elements untouched.
 

Method Detail

exec

ExecutableArrayElementsOperator<T> exec(IFunction<? super T,? extends T> function)

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

This function must be able to take as input an object of type T (the current operator's target type) and will return another object of type T.

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

exec

<X> ExecutableArrayElementsOperator<X> exec(org.javaruntype.type.Type<X> type,
                                            IFunction<? super T,X> function)

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

This function must be able to take as input an object of type T (the current operator's target type) and will return an object of type X, which will be from then on the new operator's target type.

Type Parameters:
X - the type of the result, and new type for the operator
Parameters:
type - the type returned by the function
function - the function to be executed
Returns:
an operator on the results of function execution

execIfIndex

ExecutableArrayElementsOperator<T> execIfIndex(int[] indexes,
                                               IFunction<? super T,? extends T> function)

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

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

execIfIndexNot

ExecutableArrayElementsOperator<T> execIfIndexNot(int[] indexes,
                                                  IFunction<? super T,? extends T> function)

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

Parameters:
indexes - the iteration indexes that will not be selected
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfNotNull

ExecutableArrayElementsOperator<T> execIfNotNull(IFunction<? super T,? extends T> function)

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

execIfNull

ExecutableArrayElementsOperator<T> execIfNull(IFunction<? super T,? extends T> function)

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

execIfTrue

ExecutableArrayElementsOperator<T> execIfTrue(IFunction<? super T,Boolean> eval,
                                              IFunction<? super T,? extends T> function)

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

execIfFalse

ExecutableArrayElementsOperator<T> execIfFalse(IFunction<? super T,Boolean> eval,
                                               IFunction<? super T,? extends T> function)

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

execIfIndex

<X> ExecutableArrayElementsOperator<X> execIfIndex(org.javaruntype.type.Type<X> type,
                                                   int[] indexes,
                                                   IFunction<? super T,X> function,
                                                   IFunction<? super T,X> elseFunction)

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

Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
indexes - the iteration indexes that will be selected
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

execIfIndexNot

<X> ExecutableArrayElementsOperator<X> execIfIndexNot(org.javaruntype.type.Type<X> type,
                                                      int[] indexes,
                                                      IFunction<? super T,X> function,
                                                      IFunction<? super T,X> elseFunction)

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

Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
indexes - the iteration indexes that will not be selected
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

execIfNotNull

<X> ExecutableArrayElementsOperator<X> execIfNotNull(org.javaruntype.type.Type<X> type,
                                                     IFunction<? super T,X> function,
                                                     IFunction<? super T,X> elseFunction)

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

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

execIfNull

<X> ExecutableArrayElementsOperator<X> execIfNull(org.javaruntype.type.Type<X> type,
                                                  IFunction<? super T,X> function,
                                                  IFunction<? super T,X> elseFunction)

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

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

execIfTrue

<X> ExecutableArrayElementsOperator<X> execIfTrue(org.javaruntype.type.Type<X> type,
                                                  IFunction<? super T,Boolean> eval,
                                                  IFunction<? super T,X> function,
                                                  IFunction<? super T,X> elseFunction)

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

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

execIfFalse

<X> ExecutableArrayElementsOperator<X> execIfFalse(org.javaruntype.type.Type<X> type,
                                                   IFunction<? super T,Boolean> eval,
                                                   IFunction<? super T,X> function,
                                                   IFunction<? super T,X> elseFunction)

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

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