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

All Known Subinterfaces:
ILevel0ListSelectedOperator<I,T>
All Known Implementing Classes:
Level0ListSelectedOperator, Level0ListSelectedOperator

public interface ExecutableListSelectedOperator<T>

This interface contains methods for executing functions on operators with list target objects on which a selection ("if") has already been done.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 ExecutableListSelectedOperator<T> execAsList(IFunction<? super List<T>,? extends List<? extends T>> function)
           Executes the specified function on the target object, creating a new list operator containing the result of the execution.
 ExecutableListSelectedOperator<T> map(IFunction<? super T,? extends T> function)
           Executes the specified function on each of the elements, creating a new list operator containing the result of all the executions.
 

Method Detail

execAsList

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

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

This function does not allow the operator target type to change because a selection ("if") has already been done on the target objects, and this would render the operator inconsistent (some objects would belong to a type and others to another type).

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

map

ExecutableListSelectedOperator<T> map(IFunction<? super T,? extends T> function)

Executes the specified function on each of the elements, creating a new list operator containing the result of all the executions.

This function does not allow the operator target type to change because a selection ("if") has already been done on the target objects, and this would render the operator inconsistent (some objects would belong to a type and others to another type).

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

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


Copyright © 2012 The OP4J team. All Rights Reserved.