|
||||||||||
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.Level1MapSelectedEntriesOperator<I,K,V>
public final class Level1MapSelectedEntriesOperator<I,K,V>
Constructor Summary | |
---|---|
Level1MapSelectedEntriesOperator(Target target)
|
Method Summary | |
---|---|
Level0MapSelectedOperator<I,K,V> |
endFor()
Ends the current iteration. |
Level1MapSelectedEntriesOperator<I,K,V> |
execAsMapEntry(IFunction<? super Map.Entry<K,V>,? extends Map.Entry<? extends K,? extends V>> function)
Executes the specified function on the target mape entry, creating a new map entry operator containing the result of the execution. |
Map<K,V> |
get()
Returns the target object this operator currently holds. |
Level1MapSelectedEntriesSelectedOperator<I,K,V> |
ifFalse(IFunction<? super Map.Entry<K,V>,Boolean> eval)
Selects only those targets for which the specified evaluator returns false. |
Level1MapSelectedEntriesSelectedOperator<I,K,V> |
ifIndex(int... indexes)
Selects only those targets which index in the current level of iteration matches any of the specified indexes. |
Level1MapSelectedEntriesSelectedOperator<I,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. |
Level1MapSelectedEntriesSelectedOperator<I,K,V> |
ifKeyEquals(K... keys)
Selects only those entries which key matches any of the specified values. |
Level1MapSelectedEntriesSelectedOperator<I,K,V> |
ifKeyNotEquals(K... keys)
Selects only those entries which key does not match any of the specified values. |
Level1MapSelectedEntriesSelectedOperator<I,K,V> |
ifTrue(IFunction<? super Map.Entry<K,V>,Boolean> eval)
Selects only those targets for which the specified evaluator returns true. |
Level2MapSelectedEntriesKeyOperator<I,K,V> |
onKey()
Accesses the key of a map entry. |
Level2MapSelectedEntriesValueOperator<I,K,V> |
onValue()
Accesses the value of a map entry. |
Level1MapSelectedEntriesOperator<I,K,V> |
replaceWith(Map.Entry<K,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 Level1MapSelectedEntriesOperator(Target target)
Method Detail |
---|
public Level1MapSelectedEntriesSelectedOperator<I,K,V> ifTrue(IFunction<? super Map.Entry<K,V>,Boolean> eval)
SelectableMapEntryOperator
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 ILevel1MapSelectedEntriesOperator<I,K,V>
ifTrue
in interface SelectableMapEntryOperator<K,V>
eval
- the evaluator to be used for selecting targets.
public Level1MapSelectedEntriesSelectedOperator<I,K,V> ifFalse(IFunction<? super Map.Entry<K,V>,Boolean> eval)
SelectableMapEntryOperator
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 ILevel1MapSelectedEntriesOperator<I,K,V>
ifFalse
in interface SelectableMapEntryOperator<K,V>
eval
- the evaluator to be used for selecting targets.
public Level1MapSelectedEntriesSelectedOperator<I,K,V> ifIndex(int... indexes)
SelectableMapEntryOperator
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.
ifIndex
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
ifIndex
in interface SelectableMapEntryOperator<K,V>
indexes
- the indexes of the target objects which will be selected.
public Level1MapSelectedEntriesSelectedOperator<I,K,V> ifIndexNot(int... indexes)
SelectableMapEntryOperator
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.
ifIndexNot
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
ifIndexNot
in interface SelectableMapEntryOperator<K,V>
indexes
- the indexes of the target objects which will be selected.
public Level0MapSelectedOperator<I,K,V> endFor()
NavigatingMapOperator
Ends the current iteration. After the execution of this method, all subsequent operations will be applied on the iterated map as a whole instead of each entry.
endFor
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
endFor
in interface NavigatingMapOperator<K,V>
public Level1MapSelectedEntriesSelectedOperator<I,K,V> ifKeyEquals(K... keys)
SelectableMapEntryOperator
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.
ifKeyEquals
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
ifKeyEquals
in interface SelectableMapEntryOperator<K,V>
keys
- the key values to be matched
public Level1MapSelectedEntriesSelectedOperator<I,K,V> ifKeyNotEquals(K... keys)
SelectableMapEntryOperator
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.
ifKeyNotEquals
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
ifKeyNotEquals
in interface SelectableMapEntryOperator<K,V>
keys
- the key values to be matched
public Level2MapSelectedEntriesKeyOperator<I,K,V> onKey()
NavigableMapEntryOperator
Accesses the key of a map entry. After the execution of this method, all subsequent operations will be performed on the map entry's key, until an "endOn()" method is executed.
onKey
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
onKey
in interface NavigableMapEntryOperator
public Level2MapSelectedEntriesValueOperator<I,K,V> onValue()
NavigableMapEntryOperator
Accesses the value of a map entry. After the execution of this method, all subsequent operations will be performed on the map entry's value, until an "endOn()" method is executed.
onValue
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
onValue
in interface NavigableMapEntryOperator
public Level1MapSelectedEntriesOperator<I,K,V> execAsMapEntry(IFunction<? super Map.Entry<K,V>,? extends Map.Entry<? extends K,? extends V>> function)
ExecutableMapEntrySelectedOperator
Executes the specified function on the target mape entry, creating a new map entry 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).
execAsMapEntry
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
execAsMapEntry
in interface ExecutableMapEntrySelectedOperator<K,V>
function
- the function to be executed
public Level1MapSelectedEntriesOperator<I,K,V> replaceWith(Map.Entry<K,V> replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ILevel1MapSelectedEntriesOperator<I,K,V>
replaceWith
in interface ReplaceableOperator<Map.Entry<K,V>>
replacement
- the object which will replace the current target object.
public Map<K,V> get()
UniqOpOperator
Returns the target object this operator currently holds.
get
in interface UniqOpOperator<I,Map<K,V>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |