|
||||||||||
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.fn.array.Level1ArraySelectedElementsOperator<I,T>
public final class Level1ArraySelectedElementsOperator<I,T>
Constructor Summary | |
---|---|
Level1ArraySelectedElementsOperator(org.javaruntype.type.Type<T> type,
Target target)
|
Method Summary | |
---|---|
Level0ArraySelectedOperator<I,T> |
endFor()
Ends the current iteration. |
Level1ArraySelectedElementsOperator<I,T> |
exec(IFunction<? super T,? extends T> function)
Executes the specified function on the target object, creating a new operator containing the result of the execution. |
Function<I,T[]> |
get()
Returns a function which will execute all the logic specified from the "Fn.on" expression. |
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifFalse(IFunction<? super T,Boolean> eval)
Selects only those targets for which the specified evaluator returns false. |
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifIndex(int... indexes)
Selects only those targets which index in the current level of iteration matches any of the specified indexes. |
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifIndexNot(int... indexes)
Selects only those targets which index in the current level of iteration does not match any of the specified indexes. |
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifNotNull()
Selects only those targets which are not null. |
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifNotNullAndFalse(IFunction<? super T,Boolean> eval)
|
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifNotNullAndTrue(IFunction<? super T,Boolean> eval)
|
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifNull()
Selects only those targets which are null. |
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifNullOrFalse(IFunction<? super T,Boolean> eval)
|
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifNullOrTrue(IFunction<? super T,Boolean> eval)
|
Level1ArraySelectedElementsSelectedOperator<I,T> |
ifTrue(IFunction<? super T,Boolean> eval)
Selects only those targets for which the specified evaluator returns true. |
Level1ArraySelectedElementsOperator<I,T> |
replaceWith(T 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 Level1ArraySelectedElementsOperator(org.javaruntype.type.Type<T> type, Target target)
Method Detail |
---|
public Level1ArraySelectedElementsSelectedOperator<I,T> ifTrue(IFunction<? super T,Boolean> eval)
SelectableElementsOperator
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 ILevel1ArraySelectedElementsOperator<I,T>
ifTrue
in interface SelectableElementsOperator<T>
eval
- the evaluator to be used for selecting targets.
public Level1ArraySelectedElementsSelectedOperator<I,T> ifFalse(IFunction<? super T,Boolean> eval)
SelectableElementsOperator
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 ILevel1ArraySelectedElementsOperator<I,T>
ifFalse
in interface SelectableElementsOperator<T>
eval
- the evaluator to be used for selecting targets.
public Level1ArraySelectedElementsSelectedOperator<I,T> ifNull()
SelectableElementsOperator
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 ILevel1ArraySelectedElementsOperator<I,T>
ifNull
in interface SelectableElementsOperator<T>
public Level1ArraySelectedElementsSelectedOperator<I,T> ifNotNull()
SelectableElementsOperator
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 ILevel1ArraySelectedElementsOperator<I,T>
ifNotNull
in interface SelectableElementsOperator<T>
public Level1ArraySelectedElementsSelectedOperator<I,T> ifIndex(int... indexes)
SelectableElementsOperator
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 ILevel1ArraySelectedElementsOperator<I,T>
ifIndex
in interface SelectableElementsOperator<T>
indexes
- the indexes of the target objects which will be selected.
public Level1ArraySelectedElementsSelectedOperator<I,T> ifIndexNot(int... indexes)
SelectableElementsOperator
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 ILevel1ArraySelectedElementsOperator<I,T>
ifIndexNot
in interface SelectableElementsOperator<T>
indexes
- the indexes of the target objects which will be selected.
public Level0ArraySelectedOperator<I,T> endFor()
NavigatingCollectionOperator
Ends the current iteration. After the execution of this method, all subsequent operations will be applied on the iterated collection as a whole instead of in a by-element basis.
endFor
in interface ILevel1ArraySelectedElementsOperator<I,T>
endFor
in interface NavigatingCollectionOperator<T>
public Level1ArraySelectedElementsSelectedOperator<I,T> ifNullOrFalse(IFunction<? super T,Boolean> eval)
ifNullOrFalse
in interface ILevel1ArraySelectedElementsOperator<I,T>
public Level1ArraySelectedElementsSelectedOperator<I,T> ifNotNullAndFalse(IFunction<? super T,Boolean> eval)
ifNotNullAndFalse
in interface ILevel1ArraySelectedElementsOperator<I,T>
public Level1ArraySelectedElementsSelectedOperator<I,T> ifNullOrTrue(IFunction<? super T,Boolean> eval)
ifNullOrTrue
in interface ILevel1ArraySelectedElementsOperator<I,T>
public Level1ArraySelectedElementsSelectedOperator<I,T> ifNotNullAndTrue(IFunction<? super T,Boolean> eval)
ifNotNullAndTrue
in interface ILevel1ArraySelectedElementsOperator<I,T>
public Level1ArraySelectedElementsOperator<I,T> exec(IFunction<? super T,? extends T> function)
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).
exec
in interface ILevel1ArraySelectedElementsOperator<I,T>
exec
in interface ExecutableSelectedOperator<T>
function
- the function to be executed
public Level1ArraySelectedElementsOperator<I,T> replaceWith(T replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ILevel1ArraySelectedElementsOperator<I,T>
replaceWith
in interface ReplaceableOperator<T>
replacement
- the object which will replace the current target object.
public Function<I,T[]> get()
UniqFnOperator
Returns a function which will execute all the logic specified from the "Fn.on" expression.
get
in interface UniqFnOperator<I,T[]>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |