|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModifiableCollectionOperator<T>
This interface contains methods for modifying structures (adding/removing elements).
Method Summary | |
---|---|
ModifiableCollectionOperator<T> |
add(T newElement)
Adds the specified element at the end of the target structure object. |
ModifiableCollectionOperator<T> |
addAll(Collection<T> collection)
Adds all the elements in the specified collection to the target structure object. |
ModifiableCollectionOperator<T> |
addAll(T... newElements)
Adds all the specified elements at the end of the target structure object. |
ModifiableCollectionOperator<T> |
insert(int position,
T newElement)
Inserts a new element into the specified position (starting in 0) of the target structure object. |
ModifiableCollectionOperator<T> |
insertAll(int position,
T... newElements)
Inserts new elements into the specified position (starting in 0) of the target structure object. |
ModifiableCollectionOperator<T> |
removeAllEqual(T... values)
Removes the specified values from the target structure object. |
ModifiableCollectionOperator<T> |
removeAllFalse(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which evaluate as false using the specified evaluator. |
ModifiableCollectionOperator<T> |
removeAllIndexes(int... indexes)
Removes all the elements in the target structure object which position (index) in it matches one the specified indexes. |
ModifiableCollectionOperator<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. |
ModifiableCollectionOperator<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. |
ModifiableCollectionOperator<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. |
ModifiableCollectionOperator<T> |
removeAllNull()
Remove all the null elements in the target structure object. |
ModifiableCollectionOperator<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. |
ModifiableCollectionOperator<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. |
ModifiableCollectionOperator<T> |
removeAllTrue(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which evaluate as true using the specified evaluator. |
Method Detail |
---|
ModifiableCollectionOperator<T> add(T newElement)
Adds the specified element at the end of the target structure object.
The original target object is not modified, but copied instead.
newElement
- the element to be added
ModifiableCollectionOperator<T> addAll(T... newElements)
Adds all the specified elements at the end of the target structure object.
The original target object is not modified, but copied instead.
newElements
- the elements to be added
ModifiableCollectionOperator<T> insert(int position, T newElement)
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.
position
- the position in which the new element will be inserted (starting in 0)newElement
- the element to be inserted
ModifiableCollectionOperator<T> insertAll(int position, T... newElements)
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.
position
- the position in which the new element will be inserted (starting in 0)newElements
- the elements to be inserted
ModifiableCollectionOperator<T> addAll(Collection<T> collection)
Adds all the elements in the specified collection to the target structure object.
The original target object is not modified, but copied instead.
collection
- the collection containing the elements to be added
ModifiableCollectionOperator<T> removeAllIndexes(int... indexes)
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.
indexes
- the positions of the elements to be removed
ModifiableCollectionOperator<T> removeAllEqual(T... values)
Removes the specified values from the target structure object.
The original target object is not modified, but copied instead.
values
- the values to be removed from the target.
ModifiableCollectionOperator<T> removeAllTrue(IFunction<? super T,Boolean> eval)
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.
eval
- the evaluator to be used, which must return Boolean
ModifiableCollectionOperator<T> removeAllFalse(IFunction<? super T,Boolean> eval)
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.
eval
- the evaluator to be used, which must return Boolean
ModifiableCollectionOperator<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.
The original target object is not modified, but copied instead.
eval
- the evaluator to be used, which must return Boolean
ModifiableCollectionOperator<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.
The original target object is not modified, but copied instead.
eval
- the evaluator to be used, which must return Boolean
ModifiableCollectionOperator<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.
The original target object is not modified, but copied instead.
eval
- the evaluator to be used, which must return Boolean
ModifiableCollectionOperator<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.
The original target object is not modified, but copied instead.
eval
- the evaluator to be used, which must return Boolean
ModifiableCollectionOperator<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.
The original target object is not modified, but copied instead.
indexes
- the positions of the elements to be kept
ModifiableCollectionOperator<T> removeAllNull()
Remove all the null elements in the target structure object.
The original target object is not modified, but copied instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |