org.op4j.operators.intf.map
Interface ILevel2MapSelectedEntriesSelectedValueOperator<I,K,V>

All Superinterfaces:
ExecutableSelectedOperator<V>, NavigatingMapEntryOperator, Operator, ReplaceableOperator<V>, SelectableMapEntryComponentOperator<V>, UniqOperator<Map<K,V>>
All Known Implementing Classes:
Level2MapSelectedEntriesSelectedValueOperator, Level2MapSelectedEntriesSelectedValueOperator

public interface ILevel2MapSelectedEntriesSelectedValueOperator<I,K,V>
extends UniqOperator<Map<K,V>>, NavigatingMapEntryOperator, ExecutableSelectedOperator<V>, ReplaceableOperator<V>, SelectableMapEntryComponentOperator<V>

Since:
1.0
Author:
Daniel Fernández

Method Summary
 ILevel1MapSelectedEntriesSelectedOperator<I,K,V> endOn()
           Stops the selection of key/value.
 ILevel2MapSelectedEntriesSelectedValueOperator<I,K,V> exec(IFunction<? super V,? extends V> function)
           Executes the specified function on the target object, creating a new operator containing the result of the execution.
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifFalse(IFunction<? super V,Boolean> eval)
           Selects only those targets for which the specified evaluator returns false.
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNotNull()
           Selects only those targets which are not null.
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNotNullAndFalse(IFunction<? super V,Boolean> eval)
           
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNotNullAndTrue(IFunction<? super V,Boolean> eval)
           
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNull()
           Selects only those targets which are null.
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNullOrFalse(IFunction<? super V,Boolean> eval)
           
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNullOrTrue(IFunction<? super V,Boolean> eval)
           
 ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifTrue(IFunction<? super V,Boolean> eval)
           Selects only those targets for which the specified evaluator returns true.
 ILevel2MapSelectedEntriesSelectedValueOperator<I,K,V> replaceWith(V replacement)
           Replaces the current target object with the specified replacement.
 

Method Detail

ifTrue

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifTrue(IFunction<? super V,Boolean> eval)
Description copied from interface: SelectableMapEntryComponentOperator

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.

Specified by:
ifTrue in interface SelectableMapEntryComponentOperator<V>
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

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifFalse(IFunction<? super V,Boolean> eval)
Description copied from interface: SelectableMapEntryComponentOperator

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.

Specified by:
ifFalse in interface SelectableMapEntryComponentOperator<V>
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.

ifNullOrFalse

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNullOrFalse(IFunction<? super V,Boolean> eval)

ifNotNullAndFalse

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNotNullAndFalse(IFunction<? super V,Boolean> eval)

ifNull

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNull()
Description copied from interface: SelectableMapEntryComponentOperator

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.

Specified by:
ifNull in interface SelectableMapEntryComponentOperator<V>
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNullOrTrue

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNullOrTrue(IFunction<? super V,Boolean> eval)

ifNotNull

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNotNull()
Description copied from interface: SelectableMapEntryComponentOperator

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.

Specified by:
ifNotNull in interface SelectableMapEntryComponentOperator<V>
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNotNullAndTrue

ILevel2MapSelectedEntriesSelectedValueSelectedOperator<I,K,V> ifNotNullAndTrue(IFunction<? super V,Boolean> eval)

endOn

ILevel1MapSelectedEntriesSelectedOperator<I,K,V> endOn()
Description copied from interface: NavigatingMapEntryOperator

Stops the selection of key/value. After the execution of this method, all subsequent operations will be applied on the map entry as a whole instead of only on its key or value.

Specified by:
endOn in interface NavigatingMapEntryOperator
Returns:
an operator which will execute all operations on the map entry as a whole.

replaceWith

ILevel2MapSelectedEntriesSelectedValueOperator<I,K,V> replaceWith(V replacement)
Description copied from interface: ReplaceableOperator

Replaces the current target object with the specified replacement.

Specified by:
replaceWith in interface ReplaceableOperator<V>
Parameters:
replacement - the object which will replace the current target object.
Returns:
an operator containing the replacement object as target.

exec

ILevel2MapSelectedEntriesSelectedValueOperator<I,K,V> exec(IFunction<? super V,? extends V> function)
Description copied from interface: ExecutableSelectedOperator

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

Specified by:
exec in interface ExecutableSelectedOperator<V>
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution


Copyright © 2012 The OP4J team. All Rights Reserved.