org.op4j.operators.qualities
Interface SelectableMapEntryOperator<K,V>

All Known Subinterfaces:
ILevel1MapEntriesOperator<I,K,V>, ILevel1MapSelectedEntriesOperator<I,K,V>
All Known Implementing Classes:
Level1MapEntriesOperator, Level1MapEntriesOperator, Level1MapSelectedEntriesOperator, Level1MapSelectedEntriesOperator

public interface SelectableMapEntryOperator<K,V>

This interface contains methods for selecting map entries.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 SelectedMapEntryOperator<K,V> ifFalse(IFunction<? super Map.Entry<K,V>,Boolean> eval)
           Selects only those targets for which the specified evaluator returns false.
 SelectedMapEntryOperator<K,V> ifIndex(int... indexes)
           Selects only those targets which index in the current level of iteration matches any of the specified indexes.
 SelectedMapEntryOperator<K,V> ifIndexNot(int... indexes)
           Selects only those targets which index in the current level of iteration does not match any of the specified indexes.
 SelectedMapEntryOperator<K,V> ifKeyEquals(K... keys)
           Selects only those entries which key matches any of the specified values.
 SelectedMapEntryOperator<K,V> ifKeyNotEquals(K... keys)
           Selects only those entries which key does not match any of the specified values.
 SelectedMapEntryOperator<K,V> ifTrue(IFunction<? super Map.Entry<K,V>,Boolean> eval)
           Selects only those targets for which the specified evaluator returns true.
 

Method Detail

ifIndex

SelectedMapEntryOperator<K,V> 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

SelectedMapEntryOperator<K,V> ifTrue(IFunction<? super Map.Entry<K,V>,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

SelectedMapEntryOperator<K,V> ifFalse(IFunction<? super Map.Entry<K,V>,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.

ifIndexNot

SelectedMapEntryOperator<K,V> 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.

ifKeyEquals

SelectedMapEntryOperator<K,V> ifKeyEquals(K... keys)

Selects only those entries which key matches any of the specified values. 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:
keys - the key values to be matched
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifKeyNotEquals

SelectedMapEntryOperator<K,V> ifKeyNotEquals(K... keys)

Selects only those entries which key does not match any of the specified values. 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:
keys - the key values to be matched
Returns:
an operator which will execute all subsequent operations only on the selected target objects.


Copyright © 2012 The OP4J team. All Rights Reserved.