|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILevel0ArraySelectedOperator<I,T>
Method Summary | |
---|---|
ILevel0ArraySelectedOperator<I,T> |
add(T newElement)
Adds the specified element at the end of the target structure object. |
ILevel0ArraySelectedOperator<I,T> |
addAll(Collection<T> collection)
Adds all the elements in the specified collection to the target structure object. |
ILevel0ArraySelectedOperator<I,T> |
addAll(T... newElements)
Adds all the specified elements at the end of the target structure object. |
ILevel0ArraySelectedOperator<I,T> |
distinct()
Removes all duplicate elements from the target collection or array. |
ILevel0ArrayOperator<I,T> |
endIf()
Ends the selection currently active for this level. |
ILevel0ArraySelectedOperator<I,T> |
execAsArray(IFunction<? super T[],? extends T[]> function)
Executes the specified function on the target object, creating a new array operator containing the result of the execution. |
ILevel1ArraySelectedElementsOperator<I,T> |
forEach()
Iterates the target collection. |
ILevel0ArraySelectedOperator<I,T> |
insert(int position,
T newElement)
Inserts a new element into the specified position (starting in 0) of the target structure object. |
ILevel0ArraySelectedOperator<I,T> |
insertAll(int position,
T... newElements)
Inserts new elements into the specified position (starting in 0) of the target structure object. |
ILevel0ArraySelectedOperator<I,T> |
map(IFunction<? super T,? extends T> function)
Executes the specified function on each of the elements, creating a new array operator containing the result of all the executions. |
ILevel0ArraySelectedOperator<I,T> |
removeAllEqual(T... values)
Removes the specified values from the target structure object. |
ILevel0ArraySelectedOperator<I,T> |
removeAllFalse(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which evaluate as false using the specified evaluator. |
ILevel0ArraySelectedOperator<I,T> |
removeAllIndexes(int... indexes)
Removes all the elements in the target structure object which position (index) in it matches one the specified indexes. |
ILevel0ArraySelectedOperator<I,T> |
removeAllIndexesNot(int... indexes)
Removes all the elements in the target structure object except those which position (index) in it matches one of the specified indexes. |
ILevel0ArraySelectedOperator<I,T> |
removeAllNotNullAndFalse(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which are not null and evaluate as false using the specified evaluator. |
ILevel0ArraySelectedOperator<I,T> |
removeAllNotNullAndTrue(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which are not null and evaluate as true using the specified evaluator. |
ILevel0ArraySelectedOperator<I,T> |
removeAllNull()
Remove all the null elements in the target structure object. |
ILevel0ArraySelectedOperator<I,T> |
removeAllNullOrFalse(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which either are null or evaluate as false using the specified evaluator. |
ILevel0ArraySelectedOperator<I,T> |
removeAllNullOrTrue(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which either are null or evaluate as true using the specified evaluator. |
ILevel0ArraySelectedOperator<I,T> |
removeAllTrue(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which evaluate as true using the specified evaluator. |
ILevel0ArraySelectedOperator<I,T> |
replaceWith(T[] replacement)
Replaces the current target object with the specified replacement. |
ILevel0ArraySelectedOperator<I,T> |
sort()
Sorts the elements of the structure according to their natural ordering. |
ILevel0ArraySelectedOperator<I,T> |
sort(Comparator<? super T> comparator)
Sorts the elements of the structure according to the order induced by the specified comparator. |
ILevel0ArraySelectedOperator<I,T> |
sortBy(IFunction<? super T,?> by)
Sorts the elements of the structure according to the result of executing the specified function. |
Method Detail |
---|
ILevel0ArrayOperator<I,T> endIf()
SelectedOperator
Ends the selection currently active for this level.
endIf
in interface SelectedOperator<T[]>
ILevel1ArraySelectedElementsOperator<I,T> forEach()
NavigableCollectionOperator
Iterates the target collection. After executing this method, any further operations will be applied on each of the collection elements until an "endFor()" method is called.
forEach
in interface NavigableCollectionOperator<T>
ILevel0ArraySelectedOperator<I,T> distinct()
DistinguishableOperator
Removes all duplicate elements from the target collection or array.
distinct
in interface DistinguishableOperator
ILevel0ArraySelectedOperator<I,T> sort()
SortableOperator
Sorts the elements of the structure according to their natural ordering.
sort
in interface SortableOperator<T>
ILevel0ArraySelectedOperator<I,T> sort(Comparator<? super T> comparator)
SortableOperator
Sorts the elements of the structure according to the order induced by the specified comparator.
sort
in interface SortableOperator<T>
comparator
- the comparator to be used.
ILevel0ArraySelectedOperator<I,T> sortBy(IFunction<? super T,?> by)
SortableOperator
Sorts the elements of the structure according to the result of executing the specified function.
sortBy
in interface SortableOperator<T>
by
- the function to be executed in order to obtain the compared object
ILevel0ArraySelectedOperator<I,T> add(T newElement)
ModifiableCollectionOperator
Adds the specified element at the end of the target structure object.
The original target object is not modified, but copied instead.
add
in interface ModifiableCollectionOperator<T>
newElement
- the element to be added
ILevel0ArraySelectedOperator<I,T> addAll(T... newElements)
ModifiableCollectionOperator
Adds all the specified elements at the end of the target structure object.
The original target object is not modified, but copied instead.
addAll
in interface ModifiableCollectionOperator<T>
newElements
- the elements to be added
ILevel0ArraySelectedOperator<I,T> insert(int position, T newElement)
ModifiableCollectionOperator
Inserts a new element into the specified position (starting in 0) of the target structure object.
The original target object is not modified, but copied instead.
insert
in interface ModifiableCollectionOperator<T>
position
- the position in which the new element will be inserted (starting in 0)newElement
- the element to be inserted
ILevel0ArraySelectedOperator<I,T> insertAll(int position, T... newElements)
ModifiableCollectionOperator
Inserts new elements into the specified position (starting in 0) of the target structure object.
The original target object is not modified, but copied instead.
insertAll
in interface ModifiableCollectionOperator<T>
position
- the position in which the new element will be inserted (starting in 0)newElements
- the elements to be inserted
ILevel0ArraySelectedOperator<I,T> addAll(Collection<T> collection)
ModifiableCollectionOperator
Adds all the elements in the specified collection to the target structure object.
The original target object is not modified, but copied instead.
addAll
in interface ModifiableCollectionOperator<T>
collection
- the collection containing the elements to be added
ILevel0ArraySelectedOperator<I,T> removeAllIndexes(int... indexes)
ModifiableCollectionOperator
Removes all the elements in the target structure object which position (index) in it matches one the specified indexes.
The original target object is not modified, but copied instead.
removeAllIndexes
in interface ModifiableCollectionOperator<T>
indexes
- the positions of the elements to be removed
ILevel0ArraySelectedOperator<I,T> removeAllEqual(T... values)
ModifiableCollectionOperator
Removes the specified values from the target structure object.
The original target object is not modified, but copied instead.
removeAllEqual
in interface ModifiableCollectionOperator<T>
values
- the values to be removed from the target.
ILevel0ArraySelectedOperator<I,T> removeAllTrue(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which evaluate as true using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllTrue
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0ArraySelectedOperator<I,T> removeAllFalse(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which evaluate as false using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllFalse
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0ArraySelectedOperator<I,T> removeAllNullOrFalse(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which either are null or evaluate as false using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNullOrFalse
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0ArraySelectedOperator<I,T> removeAllNotNullAndFalse(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which are not null and evaluate as false using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNotNullAndFalse
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0ArraySelectedOperator<I,T> removeAllNotNullAndTrue(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which are not null and evaluate as true using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNotNullAndTrue
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0ArraySelectedOperator<I,T> removeAllNullOrTrue(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which either are null or evaluate as true using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNullOrTrue
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0ArraySelectedOperator<I,T> removeAllIndexesNot(int... indexes)
ModifiableCollectionOperator
Removes all the elements in the target structure object except those which position (index) in it matches one of the specified indexes.
The original target object is not modified, but copied instead.
removeAllIndexesNot
in interface ModifiableCollectionOperator<T>
indexes
- the positions of the elements to be kept
ILevel0ArraySelectedOperator<I,T> removeAllNull()
ModifiableCollectionOperator
Remove all the null elements in the target structure object.
The original target object is not modified, but copied instead.
removeAllNull
in interface ModifiableCollectionOperator<T>
ILevel0ArraySelectedOperator<I,T> replaceWith(T[] replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ReplaceableOperator<T[]>
replacement
- the object which will replace the current target object.
ILevel0ArraySelectedOperator<I,T> execAsArray(IFunction<? super T[],? extends T[]> function)
ExecutableArraySelectedOperator
Executes the specified function on the target object, creating a new array 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).
execAsArray
in interface ExecutableArraySelectedOperator<T>
function
- the function to be executed
ILevel0ArraySelectedOperator<I,T> map(IFunction<? super T,? extends T> function)
ExecutableArraySelectedOperator
Executes the specified function on each of the elements, creating a new array operator containing the result of all the executions.
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).
This method is equivalent to forEach().exec(function).endFor().
map
in interface ExecutableArraySelectedOperator<T>
function
- the function to be executed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |