|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILevel0ListOperator<I,T>
Method Summary | ||
---|---|---|
ILevel0ListOperator<I,T> |
add(T newElement)
Adds the specified element at the end of the target structure object. |
|
ILevel0ListOperator<I,T> |
addAll(Collection<T> collection)
Adds all the elements in the specified collection to the target structure object. |
|
ILevel0ListOperator<I,T> |
addAll(T... newElements)
Adds all the specified elements at the end of the target structure object. |
|
ILevel0GenericUniqOperator<I,Boolean> |
all(IFunction<? super T,Boolean> eval)
|
|
ILevel0GenericUniqOperator<I,Boolean> |
any(IFunction<? super T,Boolean> eval)
|
|
|
castToListOf(org.javaruntype.type.Type<X> type)
Casts the operator's target as a list of the specified type. |
|
ILevel0MapOperator<I,T,T> |
couple()
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values. |
|
ILevel0MapOperator<I,T,List<T>> |
coupleAndGroup()
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values. |
|
ILevel0ListOperator<I,T> |
distinct()
Removes all duplicate elements from the target collection or array. |
|
|
exec(IFunction<? super List<T>,X> function)
Executes the specified function on the target list, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified. |
|
|
execAsList(IFunction<? super List<T>,? extends List<X>> function)
Executes the specified function on the target object, creating a new list operator containing the result of the execution. |
|
ILevel0ListOperator<I,T> |
execIfFalseAsList(IFunction<? super List<T>,Boolean> eval,
IFunction<? super List<T>,? extends List<? extends T>> function)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfFalseAsList(IFunction<? super List<T>,Boolean> eval,
IFunction<? super List<T>,? extends List<X>> function,
IFunction<? super List<T>,? extends List<X>> elseFunction)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ListOperator<I,T> |
execIfNotNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNotNullAsList(IFunction<? super List<T>,? extends List<X>> function,
IFunction<? super List<T>,? extends List<X>> elseFunction)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ListOperator<I,T> |
execIfNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNullAsList(IFunction<? super List<T>,? extends List<X>> function,
IFunction<? super List<T>,? extends List<X>> elseFunction)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ListOperator<I,T> |
execIfTrueAsList(IFunction<? super List<T>,Boolean> eval,
IFunction<? super List<T>,? extends List<? extends T>> function)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfTrueAsList(IFunction<? super List<T>,Boolean> eval,
IFunction<? super List<T>,? extends List<X>> function,
IFunction<? super List<T>,? extends List<X>> elseFunction)
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel1ListElementsOperator<I,T> |
forEach()
Iterates the target collection. |
|
ILevel0GenericUniqOperator<I,List<T>> |
generic()
Converts the specialized structure operator into generic operators (with no specific methods for structures - e.g. forEach()) |
|
ILevel0ListSelectedOperator<I,T> |
ifFalse(IFunction<? super List<T>,Boolean> eval)
Selects only those targets for which the specified evaluator returns false. |
|
ILevel0ListSelectedOperator<I,T> |
ifNotNull()
Selects only those targets which are not null. |
|
ILevel0ListSelectedOperator<I,T> |
ifNull()
Selects only those targets which are null. |
|
ILevel0ListSelectedOperator<I,T> |
ifTrue(IFunction<? super List<T>,Boolean> eval)
Selects only those targets for which the specified evaluator returns true. |
|
ILevel0ListOperator<I,T> |
insert(int position,
T newElement)
Inserts a new element into the specified position (starting in 0) of the target structure object. |
|
ILevel0ListOperator<I,T> |
insertAll(int position,
T... newElements)
Inserts new elements into the specified position (starting in 0) of the target structure object. |
|
|
map(IFunction<? super T,X> function)
Executes the specified function on each of the elements, creating a new list operator containing the result of all the executions and setting the new operator type to the one resulting from the function execution. |
|
ILevel0ListOperator<I,T> |
mapIfFalse(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfFalse(IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ListOperator<I,T> |
mapIfNotNull(IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfNotNull(IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ListOperator<I,T> |
mapIfNull(IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfNull(IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ListOperator<I,T> |
mapIfTrue(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfTrue(IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
of(org.javaruntype.type.Type<X> type)
Casts the operator's target as a list of the specified type. |
|
ILevel0ListOperator<I,T> |
removeAllEqual(T... values)
Removes the specified values from the target structure object. |
|
ILevel0ListOperator<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. |
|
ILevel0ListOperator<I,T> |
removeAllIndexes(int... indexes)
Removes all the elements in the target structure object which position (index) in it matches one the specified indexes. |
|
ILevel0ListOperator<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. |
|
ILevel0ListOperator<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. |
|
ILevel0ListOperator<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. |
|
ILevel0ListOperator<I,T> |
removeAllNull()
Remove all the null elements in the target structure object. |
|
ILevel0ListOperator<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. |
|
ILevel0ListOperator<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. |
|
ILevel0ListOperator<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. |
|
ILevel0ListOperator<I,T> |
replaceIfNullWith(List<T> replacement)
Replaces the current target object with the specified replacement if the current target is null. |
|
ILevel0ListOperator<I,T> |
replaceWith(List<T> replacement)
Replaces the current target object with the specified replacement. |
|
ILevel0ListOperator<I,T> |
reverse()
Reverses the elements of the structure. |
|
ILevel0ListOperator<I,T> |
sort()
Sorts the elements of the structure according to their natural ordering. |
|
ILevel0ListOperator<I,T> |
sort(Comparator<? super T> comparator)
Sorts the elements of the structure according to the order induced by the specified comparator. |
|
ILevel0ListOperator<I,T> |
sortBy(IFunction<? super T,?> by)
Sorts the elements of the structure according to the result of executing the specified function. |
|
ILevel0ArrayOperator<I,T> |
toArrayOf(org.javaruntype.type.Type<T> type)
Converts the current target to an array of the specified type. |
|
|
toGroupMap(IFunction<? super T,K> keyFunction,
IFunction<? super T,V> valueFunction)
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. |
|
|
toGroupMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. |
|
|
toMap(IFunction<? super T,K> keyFunction,
IFunction<? super T,V> valueFunction)
Converts the target object to a map by inputting the original target's elements into the specified functions, which will create the resulting keys and values. |
|
|
toMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. |
|
ILevel0SetOperator<I,T> |
toSet()
Converts the current target into a set. |
|
|
zipAndGroupKeys(K... keys)
Converts the target object to a map by using the original target's elements as values the specified objects as keys. |
|
|
zipAndGroupKeysBy(IFunction<? super T,K> keyEval)
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys. |
|
|
zipAndGroupKeysFrom(Collection<K> keys)
Converts the target object to a map by using the original target's elements as values the specified objects as keys. |
|
|
zipAndGroupKeysFrom(K[] keys)
Converts the target object to a map by using the original target's elements as values the specified objects as keys. |
|
|
zipAndGroupValues(V... values)
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. |
|
|
zipAndGroupValuesBy(IFunction<? super T,V> valueEval)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipAndGroupValuesFrom(Collection<V> values)
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. |
|
|
zipAndGroupValuesFrom(V[] values)
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. |
|
|
zipKeys(K... keys)
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys. |
|
|
zipKeysBy(IFunction<? super T,K> keyEval)
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys. |
|
|
zipKeysFrom(Collection<K> keys)
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys. |
|
|
zipKeysFrom(K[] keys)
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys. |
|
|
zipValues(V... values)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipValuesBy(IFunction<? super T,V> valueEval)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipValuesFrom(Collection<V> values)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipValuesFrom(V[] values)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
Method Detail |
---|
ILevel0ListSelectedOperator<I,T> ifTrue(IFunction<? super List<T>,Boolean> eval)
SelectableOperator
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 SelectableOperator<List<T>>
eval
- the evaluator to be used for selecting targets.
ILevel0ListSelectedOperator<I,T> ifFalse(IFunction<? super List<T>,Boolean> eval)
SelectableOperator
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 SelectableOperator<List<T>>
eval
- the evaluator to be used for selecting targets.
ILevel0ListSelectedOperator<I,T> ifNull()
SelectableOperator
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 SelectableOperator<List<T>>
ILevel0ListSelectedOperator<I,T> ifNotNull()
SelectableOperator
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 SelectableOperator<List<T>>
ILevel1ListElementsOperator<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>
ILevel0ListOperator<I,T> distinct()
DistinguishableOperator
Removes all duplicate elements from the target collection or array.
distinct
in interface DistinguishableOperator
ILevel0ListOperator<I,T> sort()
SortableOperator
Sorts the elements of the structure according to their natural ordering.
sort
in interface SortableOperator<T>
ILevel0ListOperator<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.
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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.
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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
ILevel0ListOperator<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>
ILevel0ArrayOperator<I,T> toArrayOf(org.javaruntype.type.Type<T> type)
ConvertibleToArrayOperator
Converts the current target to an array of the specified type.
toArrayOf
in interface ConvertibleToArrayOperator<T>
type
- the type of the array elements.
ILevel0SetOperator<I,T> toSet()
ConvertibleToSetOperator
Converts the current target into a set.
toSet
in interface ConvertibleToSetOperator
<K,V> ILevel0MapOperator<I,K,V> toMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
ConvertibleToMapOperator
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
toMap
in interface ConvertibleToMapOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdmapBuilder
- the map builder function to be used
<K,V> ILevel0MapOperator<I,K,V> toMap(IFunction<? super T,K> keyFunction, IFunction<? super T,V> valueFunction)
ConvertibleToMapOperator
Converts the target object to a map by inputting the original target's elements into the specified functions, which will create the resulting keys and values.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
toMap
in interface ConvertibleToMapOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdkeyFunction
- the function for building the keysvalueFunction
- the function for building the values
<K,V> ILevel0MapOperator<I,K,List<V>> toGroupMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
ConvertibleToMapOfListOperator
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. Values with the same key will be grouped into lists.
toGroupMap
in interface ConvertibleToMapOfListOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdmapBuilder
- the map builder function to be used
<K,V> ILevel0MapOperator<I,K,List<V>> toGroupMap(IFunction<? super T,K> keyFunction, IFunction<? super T,V> valueFunction)
ConvertibleToMapOfListOperator
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. Values with the same key will be grouped into lists.
toGroupMap
in interface ConvertibleToMapOfListOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdkeyFunction
- the function for building the keysvalueFunction
- the function for building the values
ILevel0MapOperator<I,T,T> couple()
ConvertibleToMapOperator
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values.
couple
in interface ConvertibleToMapOperator<T>
ILevel0MapOperator<I,T,List<T>> coupleAndGroup()
ConvertibleToMapOfListOperator
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values. Values with the same key will be grouped into lists.
coupleAndGroup
in interface ConvertibleToMapOfListOperator<T>
<K> ILevel0MapOperator<I,K,T> zipKeys(K... keys)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeys
in interface ConvertibleToMapOperator<T>
K
- the type of the keyskeys
- the new keys
<V> ILevel0MapOperator<I,T,V> zipValues(V... values)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
zipValues
in interface ConvertibleToMapOperator<T>
V
- the type of the valuesvalues
- the new values
<K> ILevel0MapOperator<I,K,T> zipKeysFrom(Collection<K> keys)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeysFrom
in interface ConvertibleToMapOperator<T>
K
- the type of the keyskeys
- the new keys
<V> ILevel0MapOperator<I,T,V> zipValuesFrom(Collection<V> values)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
zipValuesFrom
in interface ConvertibleToMapOperator<T>
V
- the type of the valuesvalues
- the new values
<K> ILevel0MapOperator<I,K,T> zipKeysFrom(K[] keys)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeysFrom
in interface ConvertibleToMapOperator<T>
K
- the type of the keyskeys
- the new keys
<V> ILevel0MapOperator<I,T,V> zipValuesFrom(V[] values)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
zipValuesFrom
in interface ConvertibleToMapOperator<T>
V
- the type of the valuesvalues
- the new values
<K> ILevel0MapOperator<I,K,T> zipKeysBy(IFunction<? super T,K> keyEval)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeysBy
in interface ConvertibleToMapOperator<T>
K
- the type of the keys that will be createdkeyEval
- the evaluator used for obtaining the keys
<V> ILevel0MapOperator<I,T,V> zipValuesBy(IFunction<? super T,V> valueEval)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipValuesBy
in interface ConvertibleToMapOperator<T>
V
- the type of the values that will be createdvalueEval
- the evaluator used for obtaining the values
<K> ILevel0MapOperator<I,K,List<T>> zipAndGroupKeys(K... keys)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as values the specified objects as keys. Values with the same key will be grouped into lists.
zipAndGroupKeys
in interface ConvertibleToMapOfListOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,List<V>> zipAndGroupValues(V... values)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. Values with the same key will be grouped into lists.
zipAndGroupValues
in interface ConvertibleToMapOfListOperator<T>
V
- the type of the values that will be createdvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,List<T>> zipAndGroupKeysFrom(Collection<K> keys)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as values the specified objects as keys. Values with the same key will be grouped into lists.
zipAndGroupKeysFrom
in interface ConvertibleToMapOfListOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,List<V>> zipAndGroupValuesFrom(Collection<V> values)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. Values with the same key will be grouped into lists.
zipAndGroupValuesFrom
in interface ConvertibleToMapOfListOperator<T>
V
- the type of the values that will be createdvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,List<T>> zipAndGroupKeysFrom(K[] keys)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as values the specified objects as keys. Values with the same key will be grouped into lists.
zipAndGroupKeysFrom
in interface ConvertibleToMapOfListOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,List<V>> zipAndGroupValuesFrom(V[] values)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. Values with the same key will be grouped into lists.
zipAndGroupValuesFrom
in interface ConvertibleToMapOfListOperator<T>
V
- the type of the values that will be createdvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,List<T>> zipAndGroupKeysBy(IFunction<? super T,K> keyEval)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys. Values with the same key will be grouped into lists.
zipAndGroupKeysBy
in interface ConvertibleToMapOfListOperator<T>
K
- the type of the keys that will be createdkeyEval
- the evaluator used for obtaining the keys
<V> ILevel0MapOperator<I,T,List<V>> zipAndGroupValuesBy(IFunction<? super T,V> valueEval)
ConvertibleToMapOfListOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. Values with the same key will be grouped into lists.
zipAndGroupValuesBy
in interface ConvertibleToMapOfListOperator<T>
V
- the type of the values that will be createdvalueEval
- the evaluator used for obtaining the values
ILevel0GenericUniqOperator<I,List<T>> generic()
GenerizableOperator
Converts the specialized structure operator into generic operators (with no specific methods for structures - e.g. forEach())
generic
in interface GenerizableOperator<I,List<T>>
ILevel0ListOperator<I,T> replaceWith(List<T> replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ReplaceableOperator<List<T>>
replacement
- the object which will replace the current target object.
ILevel0ListOperator<I,T> replaceIfNullWith(List<T> replacement)
ReplaceableIfNullOperator
Replaces the current target object with the specified replacement if the current target is null.
replaceIfNullWith
in interface ReplaceableIfNullOperator<List<T>>
replacement
- the object which will replace the current target object if target is null.
<X> ILevel0GenericUniqOperator<I,X> exec(IFunction<? super List<T>,X> function)
ExecutableListOperator
Executes the specified function on the target list, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified.
exec
in interface ExecutableListOperator<T>
X
- the type of the result objectfunction
- the function to be executed
<X> ILevel0ListOperator<I,X> execAsList(IFunction<? super List<T>,? extends List<X>> function)
ExecutableListOperator
Executes the specified function on the target object, creating a new list operator containing the result of the execution.
This function must be able to take as input a list of the current operator's target type, and can return a list of a different type, which will be from then on the new operator's target type.
execAsList
in interface ExecutableListOperator<T>
X
- the type of the result elementsfunction
- the function to be executed
ILevel0ListOperator<I,T> execIfNotNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNullAsList
in interface ExecutableListOperator<T>
function
- the function to be executed on the selected elements
ILevel0ListOperator<I,T> execIfNullAsList(IFunction<? super List<T>,? extends List<? extends T>> function)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNullAsList
in interface ExecutableListOperator<T>
function
- the function to be executed on the selected elements
ILevel0ListOperator<I,T> execIfTrueAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<? extends T>> function)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrueAsList
in interface ExecutableListOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
ILevel0ListOperator<I,T> execIfFalseAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<? extends T>> function)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalseAsList
in interface ExecutableListOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
<X> ILevel0ListOperator<I,X> execIfNotNullAsList(IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNullAsList
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> execIfNullAsList(IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNullAsList
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> execIfTrueAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrueAsList
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> execIfFalseAsList(IFunction<? super List<T>,Boolean> eval, IFunction<? super List<T>,? extends List<X>> function, IFunction<? super List<T>,? extends List<X>> elseFunction)
ExecutableListOperator
Executes a function in a way equivalent to ExecutableListOperator.execAsList(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalseAsList
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> map(IFunction<? super T,X> function)
ExecutableListOperator
Executes the specified function on each of the elements, creating a new list operator containing the result of all the executions and setting the new operator type to the one resulting from the function execution.
This method is equivalent to forEach().exec(function).endFor().
map
in interface ExecutableListOperator<T>
X
- the type of the result elementsfunction
- the function to be executed
ILevel0ListOperator<I,T> mapIfNotNull(IFunction<? super T,? extends T> function)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNotNull
in interface ExecutableListOperator<T>
function
- the function to be executed on the selected elements
ILevel0ListOperator<I,T> mapIfNull(IFunction<? super T,? extends T> function)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNull
in interface ExecutableListOperator<T>
function
- the function to be executed on the selected elements
ILevel0ListOperator<I,T> mapIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfTrue
in interface ExecutableListOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
ILevel0ListOperator<I,T> mapIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfFalse
in interface ExecutableListOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
<X> ILevel0ListOperator<I,X> mapIfNotNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNotNull
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> mapIfNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNull
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> mapIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfTrue
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> mapIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableListOperator
Maps a function in a way equivalent to ExecutableListOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfFalse
in interface ExecutableListOperator<T>
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
<X> ILevel0ListOperator<I,X> of(org.javaruntype.type.Type<X> type)
CastableToListOperator
Casts the operator's target as a list of the specified type.
of
in interface CastableToListOperator
X
- the type of the elements of the listtype
- the type of the elements of the list
<X> ILevel0ListOperator<I,X> castToListOf(org.javaruntype.type.Type<X> type)
CastableToListOperator
Casts the operator's target as a list of the specified type.
castToListOf
in interface CastableToListOperator
X
- the type of the elements of the listtype
- the type of the elements of the list
ILevel0GenericUniqOperator<I,Boolean> any(IFunction<? super T,Boolean> eval)
any
in interface TotalizableOperator<I,T>
ILevel0GenericUniqOperator<I,Boolean> all(IFunction<? super T,Boolean> eval)
all
in interface TotalizableOperator<I,T>
ILevel0ListOperator<I,T> reverse()
ReversibleOperator
Reverses the elements of the structure.
reverse
in interface ReversibleOperator<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |