|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.op4j.operators.impl.AbstractOperator org.op4j.operators.impl.op.map.Level2MapEntriesValueOperator<I,K,V>
public final class Level2MapEntriesValueOperator<I,K,V>
Constructor Summary | |
---|---|
Level2MapEntriesValueOperator(Target target)
|
Method Summary | ||
---|---|---|
|
castTo(org.javaruntype.type.Type<X> type)
Casts the operator's target as the specified type. |
|
Level1MapEntriesOperator<I,K,V> |
endOn()
Stops the selection of key/value. |
|
|
exec(IFunction<? super V,X> function)
Executes the specified function on the target object, creating a new operator containing the result of the execution. |
|
Level2MapEntriesValueOperator<I,K,V> |
execIfFalse(IFunction<? super V,Boolean> eval,
IFunction<? super V,? extends V> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfFalse(IFunction<? super V,Boolean> eval,
IFunction<? super V,X> function,
IFunction<? super V,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
Level2MapEntriesValueOperator<I,K,V> |
execIfNotNull(IFunction<? super V,? extends V> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNotNull(IFunction<? super V,X> function,
IFunction<? super V,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
Level2MapEntriesValueOperator<I,K,V> |
execIfNull(IFunction<? super V,? extends V> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNull(IFunction<? super V,X> function,
IFunction<? super V,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
Level2MapEntriesValueOperator<I,K,V> |
execIfTrue(IFunction<? super V,Boolean> eval,
IFunction<? super V,? extends V> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfTrue(IFunction<? super V,Boolean> eval,
IFunction<? super V,X> function,
IFunction<? super V,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
Map<K,V> |
get()
Returns the target object this operator currently holds. |
|
Level2MapEntriesValueSelectedOperator<I,K,V> |
ifFalse(IFunction<? super V,Boolean> eval)
Selects only those targets for which the specified evaluator returns false. |
|
Level2MapEntriesValueSelectedOperator<I,K,V> |
ifNotNull()
Selects only those targets which are not null. |
|
Level2MapEntriesValueSelectedOperator<I,K,V> |
ifNull()
Selects only those targets which are null. |
|
Level2MapEntriesValueSelectedOperator<I,K,V> |
ifTrue(IFunction<? super V,Boolean> eval)
Selects only those targets for which the specified evaluator returns true. |
|
Level2MapEntriesValueOperator<I,K,V> |
replaceIfNullWith(V replacement)
Replaces the current target object with the specified replacement if the current target is null. |
|
Level2MapEntriesValueOperator<I,K,V> |
replaceWith(V replacement)
Replaces the current target object with the specified replacement. |
Methods inherited from class org.op4j.operators.impl.AbstractOperator |
---|
getTarget |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Level2MapEntriesValueOperator(Target target)
Method Detail |
---|
public Level1MapEntriesOperator<I,K,V> endOn()
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.
endOn
in interface ILevel2MapEntriesValueOperator<I,K,V>
endOn
in interface NavigatingMapEntryOperator
public <X> Level2MapEntriesValueOperator<I,K,X> castTo(org.javaruntype.type.Type<X> type)
CastableToTypeOperator
Casts the operator's target as the specified type.
castTo
in interface ILevel2MapEntriesValueOperator<I,K,V>
castTo
in interface CastableToTypeOperator<V>
X
- the type of the targetstype
- the type of targets
public Map<K,V> get()
UniqOpOperator
Returns the target object this operator currently holds.
get
in interface UniqOpOperator<I,Map<K,V>>
public Level2MapEntriesValueSelectedOperator<I,K,V> ifTrue(IFunction<? super V,Boolean> eval)
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.
ifTrue
in interface ILevel2MapEntriesValueOperator<I,K,V>
ifTrue
in interface SelectableMapEntryComponentOperator<V>
eval
- the evaluator to be used for selecting targets.
public Level2MapEntriesValueSelectedOperator<I,K,V> ifFalse(IFunction<? super V,Boolean> eval)
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.
ifFalse
in interface ILevel2MapEntriesValueOperator<I,K,V>
ifFalse
in interface SelectableMapEntryComponentOperator<V>
eval
- the evaluator to be used for selecting targets.
public Level2MapEntriesValueSelectedOperator<I,K,V> ifNotNull()
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.
ifNotNull
in interface ILevel2MapEntriesValueOperator<I,K,V>
ifNotNull
in interface SelectableMapEntryComponentOperator<V>
public Level2MapEntriesValueSelectedOperator<I,K,V> ifNull()
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.
ifNull
in interface ILevel2MapEntriesValueOperator<I,K,V>
ifNull
in interface SelectableMapEntryComponentOperator<V>
public <X> Level2MapEntriesValueOperator<I,K,X> exec(IFunction<? super V,X> function)
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.
exec
in interface ILevel2MapEntriesValueOperator<I,K,V>
exec
in interface ExecutableOperator<V>
X
- the type of the result, and new type for the operatorfunction
- the function to be executed
public Level2MapEntriesValueOperator<I,K,V> replaceWith(V replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ILevel2MapEntriesValueOperator<I,K,V>
replaceWith
in interface ReplaceableOperator<V>
replacement
- the object which will replace the current target object.
public Level2MapEntriesValueOperator<I,K,V> replaceIfNullWith(V replacement)
ReplaceableIfNullOperator
Replaces the current target object with the specified replacement if the current target is null.
replaceIfNullWith
in interface ILevel2MapEntriesValueOperator<I,K,V>
replaceIfNullWith
in interface ReplaceableIfNullOperator<V>
replacement
- the object which will replace the current target object if target is null.
public Level2MapEntriesValueOperator<I,K,V> execIfFalse(IFunction<? super V,Boolean> eval, IFunction<? super V,? extends V> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalse
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfFalse
in interface ExecutableOperator<V>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
public <X> Level2MapEntriesValueOperator<I,K,X> execIfFalse(IFunction<? super V,Boolean> eval, IFunction<? super V,X> function, IFunction<? super V,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalse
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfFalse
in interface ExecutableOperator<V>
X
- the new type returned by the functionseval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
public Level2MapEntriesValueOperator<I,K,V> execIfNotNull(IFunction<? super V,? extends V> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNull
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfNotNull
in interface ExecutableOperator<V>
function
- the function to be executed on the selected elements
public <X> Level2MapEntriesValueOperator<I,K,X> execIfNotNull(IFunction<? super V,X> function, IFunction<? super V,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNull
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfNotNull
in interface ExecutableOperator<V>
X
- the new type returned by the functionsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
public Level2MapEntriesValueOperator<I,K,V> execIfNull(IFunction<? super V,? extends V> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNull
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfNull
in interface ExecutableOperator<V>
function
- the function to be executed on the selected elements
public <X> Level2MapEntriesValueOperator<I,K,X> execIfNull(IFunction<? super V,X> function, IFunction<? super V,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNull
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfNull
in interface ExecutableOperator<V>
X
- the new type returned by the functionsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
public Level2MapEntriesValueOperator<I,K,V> execIfTrue(IFunction<? super V,Boolean> eval, IFunction<? super V,? extends V> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrue
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfTrue
in interface ExecutableOperator<V>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
public <X> Level2MapEntriesValueOperator<I,K,X> execIfTrue(IFunction<? super V,Boolean> eval, IFunction<? super V,X> function, IFunction<? super V,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrue
in interface ILevel2MapEntriesValueOperator<I,K,V>
execIfTrue
in interface ExecutableOperator<V>
X
- the new type returned by the functionseval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |