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

All Known Subinterfaces:
ILevel0ArrayOperator<I,T>, ILevel0BuildingMapOperator<I,K,V>, ILevel0GenericUniqOperator<I,T>, ILevel0ListOperator<I,T>, ILevel0MapOperator<I,K,V>, ILevel0SetOperator<I,T>
All Known Implementing Classes:
Level0ArrayOperator, Level0ArrayOperator, Level0BuildingMapOperator, Level0GenericUniqOperator, Level0GenericUniqOperator, Level0ListOperator, Level0ListOperator, Level0MapOperator, Level0MapOperator, Level0SetOperator, Level0SetOperator

public interface SelectableOperator<T>

This interface contains methods for selecting targets.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 SelectedOperator<T> ifFalse(IFunction<? super T,Boolean> eval)
           Selects only those targets for which the specified evaluator returns false.
 SelectedOperator<T> ifNotNull()
           Selects only those targets which are not null.
 SelectedOperator<T> ifNull()
           Selects only those targets which are null.
 SelectedOperator<T> ifTrue(IFunction<? super T,Boolean> eval)
           Selects only those targets for which the specified evaluator returns true.
 

Method Detail

ifTrue

SelectedOperator<T> ifTrue(IFunction<? super T,Boolean> eval)

Selects only those targets for which the specified evaluator returns true. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.

Parameters:
eval - the evaluator to be used for selecting targets.
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifFalse

SelectedOperator<T> ifFalse(IFunction<? super T,Boolean> eval)

Selects only those targets for which the specified evaluator returns false. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.

Parameters:
eval - the evaluator to be used for selecting targets.
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNull

SelectedOperator<T> ifNull()

Selects only those targets which are null. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.

Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNotNull

SelectedOperator<T> ifNotNull()

Selects only those targets which are not null. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.

Returns:
an operator which will execute all subsequent operations only on the selected target objects.


Copyright © 2012 The OP4J team. All Rights Reserved.