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

All Known Subinterfaces:
ILevel1ArrayElementsOperator<I,T>, ILevel1ArraySelectedElementsOperator<I,T>, ILevel1ListElementsOperator<I,T>, ILevel1ListSelectedElementsOperator<I,T>, ILevel1SetElementsOperator<I,T>, ILevel1SetSelectedElementsOperator<I,T>
All Known Implementing Classes:
Level1ArrayElementsOperator, Level1ArrayElementsOperator, Level1ArraySelectedElementsOperator, Level1ArraySelectedElementsOperator, Level1ListElementsOperator, Level1ListElementsOperator, Level1ListSelectedElementsOperator, Level1ListSelectedElementsOperator, Level1SetElementsOperator, Level1SetElementsOperator, Level1SetSelectedElementsOperator, Level1SetSelectedElementsOperator

public interface SelectableElementsOperator<T>

This interface contains methods for selecting targets.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 SelectedElementsOperator<T> ifFalse(IFunction<? super T,Boolean> eval)
           Selects only those targets for which the specified evaluator returns false.
 SelectedElementsOperator<T> ifIndex(int... indexes)
           Selects only those targets which index in the current level of iteration matches any of the specified indexes.
 SelectedElementsOperator<T> ifIndexNot(int... indexes)
           Selects only those targets which index in the current level of iteration does not match any of the specified indexes.
 SelectedElementsOperator<T> ifNotNull()
           Selects only those targets which are not null.
 SelectedElementsOperator<T> ifNull()
           Selects only those targets which are null.
 SelectedElementsOperator<T> ifTrue(IFunction<? super T,Boolean> eval)
           Selects only those targets for which the specified evaluator returns true.
 

Method Detail

ifIndex

SelectedElementsOperator<T> ifIndex(int... indexes)

Selects only those targets which index in the current level of iteration matches any of the specified indexes. 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:
indexes - the indexes of the target objects which will be selected.
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifTrue

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

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

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

ifIndexNot

SelectedElementsOperator<T> ifIndexNot(int... indexes)

Selects only those targets which index in the current level of iteration does not match any of the specified indexes. 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:
indexes - the indexes of the target objects which will be selected.
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNotNull

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