|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILevel0ArrayOperator<I,T>
Method Summary | ||
---|---|---|
ILevel0ArrayOperator<I,T> |
add(T newElement)
Adds the specified element at the end of the target structure object. |
|
ILevel0ArrayOperator<I,T> |
addAll(Collection<T> collection)
Adds all the elements in the specified collection to the target structure object. |
|
ILevel0ArrayOperator<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)
|
|
|
castToArrayOf(org.javaruntype.type.Type<X> type)
Casts the operator's target as an array 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,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. |
|
ILevel0ArrayOperator<I,T> |
distinct()
Removes all duplicate elements from the target collection or array. |
|
|
exec(IFunction<? super T[],X> function)
Executes the specified function on the target object, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified. |
|
ILevel0ArrayOperator<I,T> |
execAsArray(IFunction<? super T[],? extends T[]> function)
Executes the specified function on the target object, creating a new operator containing the result of the execution. |
|
|
execAsArrayOf(org.javaruntype.type.Type<X> type,
IFunction<? super T[],X[]> function)
Executes the specified function on the target object, creating a new operator containing the result of the execution. |
|
ILevel0ArrayOperator<I,T> |
execIfFalseAsArray(IFunction<? super T[],Boolean> eval,
IFunction<? super T[],? extends T[]> function)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfFalseAsArrayOf(org.javaruntype.type.Type<X> type,
IFunction<? super T[],Boolean> eval,
IFunction<? super T[],X[]> function,
IFunction<? super T[],X[]> elseFunction)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ArrayOperator<I,T> |
execIfNotNullAsArray(IFunction<? super T[],? extends T[]> function)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNotNullAsArrayOf(org.javaruntype.type.Type<X> type,
IFunction<? super T[],X[]> function,
IFunction<? super T[],X[]> elseFunction)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ArrayOperator<I,T> |
execIfNullAsArray(IFunction<? super T[],? extends T[]> function)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNullAsArrayOf(org.javaruntype.type.Type<X> type,
IFunction<? super T[],X[]> function,
IFunction<? super T[],X[]> elseFunction)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ArrayOperator<I,T> |
execIfTrueAsArray(IFunction<? super T[],Boolean> eval,
IFunction<? super T[],? extends T[]> function)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfTrueAsArrayOf(org.javaruntype.type.Type<X> type,
IFunction<? super T[],Boolean> eval,
IFunction<? super T[],X[]> function,
IFunction<? super T[],X[]> elseFunction)
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel1ArrayElementsOperator<I,T> |
forEach()
Iterates the target collection. |
|
ILevel0GenericUniqOperator<I,T[]> |
generic()
Converts the specialized structure operator into generic operators (with no specific methods for structures - e.g. forEach()) |
|
ILevel0ArraySelectedOperator<I,T> |
ifFalse(IFunction<? super T[],Boolean> eval)
Selects only those targets for which the specified evaluator returns false. |
|
ILevel0ArraySelectedOperator<I,T> |
ifNotNull()
Selects only those targets which are not null. |
|
ILevel0ArraySelectedOperator<I,T> |
ifNull()
Selects only those targets which are null. |
|
ILevel0ArraySelectedOperator<I,T> |
ifTrue(IFunction<? super T[],Boolean> eval)
Selects only those targets for which the specified evaluator returns true. |
|
ILevel0ArrayOperator<I,T> |
insert(int position,
T newElement)
Inserts a new element into the specified position (starting in 0) of the target structure object. |
|
ILevel0ArrayOperator<I,T> |
insertAll(int position,
T... newElements)
Inserts new elements into the specified position (starting in 0) of the target structure object. |
|
ILevel0ArrayOperator<I,T> |
map(IFunction<? super T,? extends T> function)
Executes the specified function on each of the elements, creating a new operator containing the result of all the executions but not changing the operator type. |
|
|
map(org.javaruntype.type.Type<X> type,
IFunction<? super T,X> function)
Executes the specified function on each of the elements, creating a new operator containing the result of all the executions and setting the new operator type to the one specified. |
|
ILevel0ArrayOperator<I,T> |
mapIfFalse(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfFalse(org.javaruntype.type.Type<X> type,
IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ArrayOperator<I,T> |
mapIfNotNull(IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfNotNull(org.javaruntype.type.Type<X> type,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ArrayOperator<I,T> |
mapIfNull(IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfNull(org.javaruntype.type.Type<X> type,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0ArrayOperator<I,T> |
mapIfTrue(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfTrue(org.javaruntype.type.Type<X> type,
IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableArrayOperator.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 an array of the specified type. |
|
ILevel0ArrayOperator<I,T> |
removeAllEqual(T... values)
Removes the specified values from the target structure object. |
|
ILevel0ArrayOperator<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. |
|
ILevel0ArrayOperator<I,T> |
removeAllIndexes(int... indexes)
Removes all the elements in the target structure object which position (index) in it matches one the specified indexes. |
|
ILevel0ArrayOperator<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. |
|
ILevel0ArrayOperator<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. |
|
ILevel0ArrayOperator<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. |
|
ILevel0ArrayOperator<I,T> |
removeAllNull()
Remove all the null elements in the target structure object. |
|
ILevel0ArrayOperator<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. |
|
ILevel0ArrayOperator<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. |
|
ILevel0ArrayOperator<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. |
|
ILevel0ArrayOperator<I,T> |
replaceIfNullWith(T[] replacement)
Replaces the current target object with the specified replacement if the current target is null. |
|
ILevel0ArrayOperator<I,T> |
replaceWith(T[] replacement)
Replaces the current target object with the specified replacement. |
|
ILevel0ArrayOperator<I,T> |
reverse()
Reverses the elements of the structure. |
|
ILevel0ArrayOperator<I,T> |
sort()
Sorts the elements of the structure according to their natural ordering. |
|
ILevel0ArrayOperator<I,T> |
sort(Comparator<? super T> comparator)
Sorts the elements of the structure according to the order induced by the specified comparator. |
|
ILevel0ArrayOperator<I,T> |
sortBy(IFunction<? super T,?> by)
Sorts the elements of the structure according to the result of executing the specified function. |
|
|
toGroupMapOf(org.javaruntype.type.Type<V> valueType,
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. |
|
|
toGroupMapOf(org.javaruntype.type.Type<V> valueType,
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. |
|
ILevel0ListOperator<I,T> |
toList()
Converts the current target to a list. |
|
|
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(org.javaruntype.type.Type<V> valueType,
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(org.javaruntype.type.Type<V> valueType,
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(org.javaruntype.type.Type<V> valueType,
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(org.javaruntype.type.Type<V> valueType,
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 |
---|
ILevel0ArraySelectedOperator<I,T> ifTrue(IFunction<? super 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<T[]>
eval
- the evaluator to be used for selecting targets.
ILevel0ArraySelectedOperator<I,T> ifFalse(IFunction<? super 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<T[]>
eval
- the evaluator to be used for selecting targets.
ILevel0ArraySelectedOperator<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<T[]>
ILevel0ArraySelectedOperator<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<T[]>
ILevel1ArrayElementsOperator<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>
ILevel0ArrayOperator<I,T> distinct()
DistinguishableOperator
Removes all duplicate elements from the target collection or array.
distinct
in interface DistinguishableOperator
ILevel0ArrayOperator<I,T> sort()
SortableOperator
Sorts the elements of the structure according to their natural ordering.
sort
in interface SortableOperator<T>
ILevel0ArrayOperator<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.
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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.
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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
ILevel0ArrayOperator<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>
ILevel0ListOperator<I,T> toList()
ConvertibleToListOperator
Converts the current target to a list.
toList
in interface ConvertibleToListOperator
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,V[]> toGroupMapOf(org.javaruntype.type.Type<V> valueType, IFunction<? super T,Map.Entry<K,V>> mapBuilder)
ConvertibleToMapOfArrayOperator
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 arrays.
toGroupMapOf
in interface ConvertibleToMapOfArrayOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdvalueType
- the type of the values, that will be used for instantiating the value arraysmapBuilder
- the map builder function to be used
<K,V> ILevel0MapOperator<I,K,V[]> toGroupMapOf(org.javaruntype.type.Type<V> valueType, IFunction<? super T,K> keyFunction, IFunction<? super T,V> valueFunction)
ConvertibleToMapOfArrayOperator
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. Values with the same key will be grouped into arrays.
toGroupMapOf
in interface ConvertibleToMapOfArrayOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdvalueType
- the type of the values, that will be used for instantiating the value arrayskeyFunction
- the function for building the keysvalueFunction
- the function for building the values
<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,T[]> zipAndGroupKeys(K... keys)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupKeys
in interface ConvertibleToMapOfArrayOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValues(org.javaruntype.type.Type<V> valueType, V... values)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupValues
in interface ConvertibleToMapOfArrayOperator<T>
V
- the type of the values that will be createdvalueType
- the type of the values, that will be used for instantiating the value arraysvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,T[]> zipAndGroupKeysFrom(Collection<K> keys)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupKeysFrom
in interface ConvertibleToMapOfArrayOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValuesFrom(org.javaruntype.type.Type<V> valueType, Collection<V> values)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupValuesFrom
in interface ConvertibleToMapOfArrayOperator<T>
V
- the type of the values that will be createdvalueType
- the type of the values, that will be used for instantiating the value arraysvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,T[]> zipAndGroupKeysFrom(K[] keys)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupKeysFrom
in interface ConvertibleToMapOfArrayOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValuesFrom(org.javaruntype.type.Type<V> valueType, V[] values)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupValuesFrom
in interface ConvertibleToMapOfArrayOperator<T>
V
- the type of the values that will be createdvalueType
- the type of the values, that will be used for instantiating the value arraysvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,T[]> zipAndGroupKeysBy(IFunction<? super T,K> keyEval)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupKeysBy
in interface ConvertibleToMapOfArrayOperator<T>
K
- the type of the keys that will be createdkeyEval
- the evaluator used for obtaining the keys
<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValuesBy(org.javaruntype.type.Type<V> valueType, IFunction<? super T,V> valueEval)
ConvertibleToMapOfArrayOperator
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 arrays.
zipAndGroupValuesBy
in interface ConvertibleToMapOfArrayOperator<T>
V
- the type of the values that will be createdvalueType
- the type of the values, that will be used for instantiating the value arraysvalueEval
- the evaluator used for obtaining 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,T[]> coupleAndGroup()
ConvertibleToMapOfArrayOperator
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 arrays.
coupleAndGroup
in interface ConvertibleToMapOfArrayOperator<T>
ILevel0GenericUniqOperator<I,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,T[]>
ILevel0ArrayOperator<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.
ILevel0ArrayOperator<I,T> replaceIfNullWith(T[] replacement)
ReplaceableIfNullOperator
Replaces the current target object with the specified replacement if the current target is null.
replaceIfNullWith
in interface ReplaceableIfNullOperator<T[]>
replacement
- the object which will replace the current target object if target is null.
<X> ILevel0GenericUniqOperator<I,X> exec(IFunction<? super T[],X> function)
ExecutableArrayOperator
Executes the specified function on the target object, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified.
exec
in interface ExecutableArrayOperator<T>
X
- the type of the result objectfunction
- the function to be executed
ILevel0ArrayOperator<I,T> execAsArray(IFunction<? super T[],? extends T[]> function)
ExecutableArrayOperator
Executes the specified function on the target object, creating a new operator containing the result of the execution.
This function must be able to take as input an array of the current operator's target type, and will return an array of the same type and structure.
execAsArray
in interface ExecutableArrayOperator<T>
function
- the function to be executed
<X> ILevel0ArrayOperator<I,X> execAsArrayOf(org.javaruntype.type.Type<X> type, IFunction<? super T[],X[]> function)
ExecutableArrayOperator
Executes the specified function on the target object, creating a new operator containing the result of the execution.
This function must be able to take as input an array of the current operator's target type, and can return an array of a different type (specified by the type parameter), which will be from then on the new operator's target type.
execAsArrayOf
in interface ExecutableArrayOperator<T>
X
- the type of the result elementstype
- the new type for the operatorfunction
- the function to be executed
ILevel0ArrayOperator<I,T> execIfNotNullAsArray(IFunction<? super T[],? extends T[]> function)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNullAsArray
in interface ExecutableArrayOperator<T>
function
- the function to be executed on the selected elements
ILevel0ArrayOperator<I,T> execIfNullAsArray(IFunction<? super T[],? extends T[]> function)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNullAsArray
in interface ExecutableArrayOperator<T>
function
- the function to be executed on the selected elements
ILevel0ArrayOperator<I,T> execIfTrueAsArray(IFunction<? super T[],Boolean> eval, IFunction<? super T[],? extends T[]> function)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrueAsArray
in interface ExecutableArrayOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
ILevel0ArrayOperator<I,T> execIfFalseAsArray(IFunction<? super T[],Boolean> eval, IFunction<? super T[],? extends T[]> function)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalseAsArray
in interface ExecutableArrayOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
<X> ILevel0ArrayOperator<I,X> execIfNotNullAsArrayOf(org.javaruntype.type.Type<X> type, IFunction<? super T[],X[]> function, IFunction<? super T[],X[]> elseFunction)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNullAsArrayOf
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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> ILevel0ArrayOperator<I,X> execIfNullAsArrayOf(org.javaruntype.type.Type<X> type, IFunction<? super T[],X[]> function, IFunction<? super T[],X[]> elseFunction)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNullAsArrayOf
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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> ILevel0ArrayOperator<I,X> execIfTrueAsArrayOf(org.javaruntype.type.Type<X> type, IFunction<? super T[],Boolean> eval, IFunction<? super T[],X[]> function, IFunction<? super T[],X[]> elseFunction)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrueAsArrayOf
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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> ILevel0ArrayOperator<I,X> execIfFalseAsArrayOf(org.javaruntype.type.Type<X> type, IFunction<? super T[],Boolean> eval, IFunction<? super T[],X[]> function, IFunction<? super T[],X[]> elseFunction)
ExecutableArrayOperator
Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalseAsArrayOf
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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
ILevel0ArrayOperator<I,T> map(IFunction<? super T,? extends T> function)
ExecutableArrayOperator
Executes the specified function on each of the elements, creating a new operator containing the result of all the executions but not changing the operator type. The specified function will have to return results compatible with the current operator type.
This method is equivalent to forEach().exec(function).endFor().
map
in interface ExecutableArrayOperator<T>
function
- the function to be executed
<X> ILevel0ArrayOperator<I,X> map(org.javaruntype.type.Type<X> type, IFunction<? super T,X> function)
ExecutableArrayOperator
Executes the specified function on each of the elements, creating a new operator containing the result of all the executions and setting the new operator type to the one specified.
This method is equivalent to forEach().exec(type, function).endFor().
map
in interface ExecutableArrayOperator<T>
X
- the type of the result elementstype
- the new type for the operatorfunction
- the function to be executed
ILevel0ArrayOperator<I,T> mapIfNotNull(IFunction<? super T,? extends T> function)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNotNull
in interface ExecutableArrayOperator<T>
function
- the function to be executed on the selected elements
ILevel0ArrayOperator<I,T> mapIfNull(IFunction<? super T,? extends T> function)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNull
in interface ExecutableArrayOperator<T>
function
- the function to be executed on the selected elements
ILevel0ArrayOperator<I,T> mapIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfTrue
in interface ExecutableArrayOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
ILevel0ArrayOperator<I,T> mapIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfFalse
in interface ExecutableArrayOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
<X> ILevel0ArrayOperator<I,X> mapIfNotNull(org.javaruntype.type.Type<X> type, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNotNull
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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> ILevel0ArrayOperator<I,X> mapIfNull(org.javaruntype.type.Type<X> type, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNull
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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> ILevel0ArrayOperator<I,X> mapIfTrue(org.javaruntype.type.Type<X> type, IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfTrue
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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> ILevel0ArrayOperator<I,X> mapIfFalse(org.javaruntype.type.Type<X> type, IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableArrayOperator
Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfFalse
in interface ExecutableArrayOperator<T>
X
- the new type returned by the functionstype
- 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> ILevel0ArrayOperator<I,X> of(org.javaruntype.type.Type<X> type)
CastableToArrayOperator
Casts the operator's target as an array of the specified type.
of
in interface CastableToArrayOperator
X
- the type of the elements of the arraytype
- the type of the elements of the array
<X> ILevel0ArrayOperator<I,X> castToArrayOf(org.javaruntype.type.Type<X> type)
CastableToArrayOperator
Casts the operator's target as an array of the specified type.
castToArrayOf
in interface CastableToArrayOperator
X
- the type of the elements of the arraytype
- the type of the elements of the array
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>
ILevel0ArrayOperator<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 |