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

All Superinterfaces:
CastableToTypeOperator<K>, ExecutableOperator<K>, NavigatingMapEntryOperator, Operator, SelectableMapEntryComponentOperator<K>, UniqOperator<Map<K,V>>
All Known Implementing Classes:
Level2MapEntriesKeyOperator, Level2MapEntriesKeyOperator

public interface ILevel2MapEntriesKeyOperator<I,K,V>
extends UniqOperator<Map<K,V>>, NavigatingMapEntryOperator, CastableToTypeOperator<K>, ExecutableOperator<K>, SelectableMapEntryComponentOperator<K>

Since:
1.0
Author:
Daniel Fernández

Method Summary
<X> ILevel2MapEntriesKeyOperator<I,X,V>
castTo(org.javaruntype.type.Type<X> type)
           Casts the operator's target as the specified type.
 ILevel1MapEntriesOperator<I,K,V> endOn()
           Stops the selection of key/value.
<X> ILevel2MapEntriesKeyOperator<I,X,V>
exec(IFunction<? super K,X> function)
           Executes the specified function on the target object, creating a new operator containing the result of the execution.
 ILevel2MapEntriesKeyOperator<I,K,V> execIfFalse(IFunction<? super K,Boolean> eval, IFunction<? super K,? extends K> function)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ILevel2MapEntriesKeyOperator<I,X,V>
execIfFalse(IFunction<? super K,Boolean> eval, IFunction<? super K,X> function, IFunction<? super K,X> elseFunction)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ILevel2MapEntriesKeyOperator<I,K,V> execIfNotNull(IFunction<? super K,? extends K> function)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ILevel2MapEntriesKeyOperator<I,X,V>
execIfNotNull(IFunction<? super K,X> function, IFunction<? super K,X> elseFunction)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ILevel2MapEntriesKeyOperator<I,K,V> execIfNull(IFunction<? super K,? extends K> function)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ILevel2MapEntriesKeyOperator<I,X,V>
execIfNull(IFunction<? super K,X> function, IFunction<? super K,X> elseFunction)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ILevel2MapEntriesKeyOperator<I,K,V> execIfTrue(IFunction<? super K,Boolean> eval, IFunction<? super K,? extends K> function)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ILevel2MapEntriesKeyOperator<I,X,V>
execIfTrue(IFunction<? super K,Boolean> eval, IFunction<? super K,X> function, IFunction<? super K,X> elseFunction)
           Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.
 ILevel2MapEntriesKeySelectedOperator<I,K,V> ifFalse(IFunction<? super K,Boolean> eval)
           Selects only those targets for which the specified evaluator returns false.
 ILevel2MapEntriesKeySelectedOperator<I,K,V> ifNotNull()
           Selects only those targets which are not null.
 ILevel2MapEntriesKeySelectedOperator<I,K,V> ifNull()
           Selects only those targets which are null.
 ILevel2MapEntriesKeySelectedOperator<I,K,V> ifTrue(IFunction<? super K,Boolean> eval)
           Selects only those targets for which the specified evaluator returns true.
 ILevel2MapEntriesKeyOperator<I,K,V> replaceIfNullWith(K replacement)
           
 ILevel2MapEntriesKeyOperator<I,K,V> replaceWith(K replacement)
           
 

Method Detail

ifTrue

ILevel2MapEntriesKeySelectedOperator<I,K,V> ifTrue(IFunction<? super K,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<K>
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

ILevel2MapEntriesKeySelectedOperator<I,K,V> ifFalse(IFunction<? super K,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<K>
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

ILevel2MapEntriesKeySelectedOperator<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<K>
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNotNull

ILevel2MapEntriesKeySelectedOperator<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<K>
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

endOn

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

castTo

<X> ILevel2MapEntriesKeyOperator<I,X,V> castTo(org.javaruntype.type.Type<X> type)
Description copied from interface: CastableToTypeOperator

Casts the operator's target as the specified type.

Specified by:
castTo in interface CastableToTypeOperator<K>
Type Parameters:
X - the type of the targets
Parameters:
type - the type of targets
Returns:
the resulting casted operator

exec

<X> ILevel2MapEntriesKeyOperator<I,X,V> exec(IFunction<? super K,X> function)
Description copied from interface: ExecutableOperator

Executes the specified function on the target object, creating a new operator containing the result of the execution.

This function must be able to take as input an object of type T (the current operator's target type) and will return an object of type X, which will be from then on the new operator's target type.

Specified by:
exec in interface ExecutableOperator<K>
Type Parameters:
X - the type of the result, and new type for the operator
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution

execIfNotNull

ILevel2MapEntriesKeyOperator<I,K,V> execIfNotNull(IFunction<? super K,? extends K> function)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNotNull in interface ExecutableOperator<K>
Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfNull

ILevel2MapEntriesKeyOperator<I,K,V> execIfNull(IFunction<? super K,? extends K> function)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNull in interface ExecutableOperator<K>
Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfTrue

ILevel2MapEntriesKeyOperator<I,K,V> execIfTrue(IFunction<? super K,Boolean> eval,
                                               IFunction<? super K,? extends K> function)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfTrue in interface ExecutableOperator<K>
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfFalse

ILevel2MapEntriesKeyOperator<I,K,V> execIfFalse(IFunction<? super K,Boolean> eval,
                                                IFunction<? super K,? extends K> function)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfFalse in interface ExecutableOperator<K>
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfNotNull

<X> ILevel2MapEntriesKeyOperator<I,X,V> execIfNotNull(IFunction<? super K,X> function,
                                                      IFunction<? super K,X> elseFunction)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNotNull in interface ExecutableOperator<K>
Type Parameters:
X - the new type returned by the functions
Parameters:
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfNull

<X> ILevel2MapEntriesKeyOperator<I,X,V> execIfNull(IFunction<? super K,X> function,
                                                   IFunction<? super K,X> elseFunction)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNull in interface ExecutableOperator<K>
Type Parameters:
X - the new type returned by the functions
Parameters:
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfTrue

<X> ILevel2MapEntriesKeyOperator<I,X,V> execIfTrue(IFunction<? super K,Boolean> eval,
                                                   IFunction<? super K,X> function,
                                                   IFunction<? super K,X> elseFunction)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfTrue in interface ExecutableOperator<K>
Type Parameters:
X - the new type returned by the functions
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfFalse

<X> ILevel2MapEntriesKeyOperator<I,X,V> execIfFalse(IFunction<? super K,Boolean> eval,
                                                    IFunction<? super K,X> function,
                                                    IFunction<? super K,X> elseFunction)
Description copied from interface: ExecutableOperator

Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfFalse in interface ExecutableOperator<K>
Type Parameters:
X - the new type returned by the functions
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

replaceWith

ILevel2MapEntriesKeyOperator<I,K,V> replaceWith(K replacement)

replaceIfNullWith

ILevel2MapEntriesKeyOperator<I,K,V> replaceIfNullWith(K replacement)


Copyright © 2012 The OP4J team. All Rights Reserved.