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

All Known Subinterfaces:
ILevel0SetSelectedOperator<I,T>
All Known Implementing Classes:
Level0SetSelectedOperator, Level0SetSelectedOperator

public interface ExecutableSetSelectedOperator<T>

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

Since:
1.0
Author:
Daniel Fernández

Method Summary
 ExecutableSetSelectedOperator<T> execAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)
           Executes the specified function on the target set, creating a new set operator containing the result of the execution.
 ExecutableSetSelectedOperator<T> map(IFunction<? super T,? extends T> function)
           Executes the specified function on each of the elements, creating a new set operator containing the result of all the executions.
 

Method Detail

execAsSet

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

Executes the specified function on the target set, creating a new set 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

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

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