org.op4j.operators.intf.array
Interface ILevel0ArrayOperator<I,T>

All Superinterfaces:
CastableToArrayOperator, ConvertibleToListOperator, ConvertibleToMapOfArrayOperator<T>, ConvertibleToMapOperator<T>, ConvertibleToSetOperator, DistinguishableOperator, ExecutableArrayOperator<T>, GenerizableOperator<I,T[]>, ModifiableCollectionOperator<T>, NavigableCollectionOperator<T>, Operator, ReplaceableIfNullOperator<T[]>, ReplaceableOperator<T[]>, ReversibleOperator<T>, SelectableOperator<T[]>, SortableOperator<T>, TotalizableOperator<I,T>, UniqOperator<T[]>
All Known Implementing Classes:
Level0ArrayOperator, Level0ArrayOperator

public interface ILevel0ArrayOperator<I,T>
extends UniqOperator<T[]>, NavigableCollectionOperator<T>, DistinguishableOperator, SortableOperator<T>, CastableToArrayOperator, ModifiableCollectionOperator<T>, SelectableOperator<T[]>, ReplaceableOperator<T[]>, ReplaceableIfNullOperator<T[]>, GenerizableOperator<I,T[]>, ExecutableArrayOperator<T>, ConvertibleToListOperator, ConvertibleToSetOperator, ConvertibleToMapOperator<T>, ConvertibleToMapOfArrayOperator<T>, TotalizableOperator<I,T>, ReversibleOperator<T>

Since:
1.0
Author:
Daniel Fernández

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)
           
<X> ILevel0ArrayOperator<I,X>
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.
<X> ILevel0GenericUniqOperator<I,X>
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.
<X> ILevel0ArrayOperator<I,X>
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.
<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)
           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.
<X> ILevel0ArrayOperator<I,X>
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.
<X> ILevel0ArrayOperator<I,X>
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.
<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)
           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.
<X> ILevel0ArrayOperator<I,X>
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.
<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)
           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.
<X> ILevel0ArrayOperator<I,X>
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.
<X> ILevel0ArrayOperator<I,X>
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.
<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)
           Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.
<X> ILevel0ArrayOperator<I,X>
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.
<K,V> ILevel0MapOperator<I,K,V[]>
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.
<K,V> ILevel0MapOperator<I,K,V[]>
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.
<K,V> ILevel0MapOperator<I,K,V>
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.
<K,V> ILevel0MapOperator<I,K,V>
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.
<K> ILevel0MapOperator<I,K,T[]>
zipAndGroupKeys(K... keys)
           Converts the target object to a map by using the original target's elements as values the specified objects as keys.
<K> ILevel0MapOperator<I,K,T[]>
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.
<K> ILevel0MapOperator<I,K,T[]>
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.
<K> ILevel0MapOperator<I,K,T[]>
zipAndGroupKeysFrom(K[] keys)
           Converts the target object to a map by using the original target's elements as values the specified objects as keys.
<V> ILevel0MapOperator<I,T,V[]>
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.
<V> ILevel0MapOperator<I,T,V[]>
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.
<V> ILevel0MapOperator<I,T,V[]>
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.
<V> ILevel0MapOperator<I,T,V[]>
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.
<K> ILevel0MapOperator<I,K,T>
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.
<K> ILevel0MapOperator<I,K,T>
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.
<K> ILevel0MapOperator<I,K,T>
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.
<K> ILevel0MapOperator<I,K,T>
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.
<V> ILevel0MapOperator<I,T,V>
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.
<V> ILevel0MapOperator<I,T,V>
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.
<V> ILevel0MapOperator<I,T,V>
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.
<V> ILevel0MapOperator<I,T,V>
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

ifTrue

ILevel0ArraySelectedOperator<I,T> ifTrue(IFunction<? super T[],Boolean> eval)
Description copied from interface: 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.

Specified by:
ifTrue in interface SelectableOperator<T[]>
Parameters:
eval - the evaluator to be used for selecting targets.
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifFalse

ILevel0ArraySelectedOperator<I,T> ifFalse(IFunction<? super T[],Boolean> eval)
Description copied from interface: 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.

Specified by:
ifFalse in interface SelectableOperator<T[]>
Parameters:
eval - the evaluator to be used for selecting targets.
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNull

ILevel0ArraySelectedOperator<I,T> ifNull()
Description copied from interface: 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.

Specified by:
ifNull in interface SelectableOperator<T[]>
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

ifNotNull

ILevel0ArraySelectedOperator<I,T> ifNotNull()
Description copied from interface: 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.

Specified by:
ifNotNull in interface SelectableOperator<T[]>
Returns:
an operator which will execute all subsequent operations only on the selected target objects.

forEach

ILevel1ArrayElementsOperator<I,T> forEach()
Description copied from interface: 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.

Specified by:
forEach in interface NavigableCollectionOperator<T>
Returns:
an operator which will execute all operations on each element of the collection.

distinct

ILevel0ArrayOperator<I,T> distinct()
Description copied from interface: DistinguishableOperator

Removes all duplicate elements from the target collection or array.

Specified by:
distinct in interface DistinguishableOperator
Returns:
an operator with the resulting target collection or array.

sort

ILevel0ArrayOperator<I,T> sort()
Description copied from interface: SortableOperator

Sorts the elements of the structure according to their natural ordering.

Specified by:
sort in interface SortableOperator<T>
Returns:
an operator containing the sorted structure as target object.

sort

ILevel0ArrayOperator<I,T> sort(Comparator<? super T> comparator)
Description copied from interface: SortableOperator

Sorts the elements of the structure according to the order induced by the specified comparator.

Specified by:
sort in interface SortableOperator<T>
Parameters:
comparator - the comparator to be used.
Returns:
an operator containing the sorted structure as target object.

sortBy

ILevel0ArrayOperator<I,T> sortBy(IFunction<? super T,?> by)
Description copied from interface: SortableOperator

Sorts the elements of the structure according to the result of executing the specified function.

Specified by:
sortBy in interface SortableOperator<T>
Parameters:
by - the function to be executed in order to obtain the compared object
Returns:
an operator containing the sorted structure as target object.

add

ILevel0ArrayOperator<I,T> add(T newElement)
Description copied from interface: ModifiableCollectionOperator

Adds the specified element at the end of the target structure object.

The original target object is not modified, but copied instead.

Specified by:
add in interface ModifiableCollectionOperator<T>
Parameters:
newElement - the element to be added
Returns:
an operator holding the modified target object

addAll

ILevel0ArrayOperator<I,T> addAll(T... newElements)
Description copied from interface: ModifiableCollectionOperator

Adds all the specified elements at the end of the target structure object.

The original target object is not modified, but copied instead.

Specified by:
addAll in interface ModifiableCollectionOperator<T>
Parameters:
newElements - the elements to be added
Returns:
an operator holding the modified target object

insert

ILevel0ArrayOperator<I,T> insert(int position,
                                 T newElement)
Description copied from interface: 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.

Specified by:
insert in interface ModifiableCollectionOperator<T>
Parameters:
position - the position in which the new element will be inserted (starting in 0)
newElement - the element to be inserted
Returns:
an operator holding the modified target object

insertAll

ILevel0ArrayOperator<I,T> insertAll(int position,
                                    T... newElements)
Description copied from interface: 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.

Specified by:
insertAll in interface ModifiableCollectionOperator<T>
Parameters:
position - the position in which the new element will be inserted (starting in 0)
newElements - the elements to be inserted
Returns:
an operator holding the modified target object

addAll

ILevel0ArrayOperator<I,T> addAll(Collection<T> collection)
Description copied from interface: ModifiableCollectionOperator

Adds all the elements in the specified collection to the target structure object.

The original target object is not modified, but copied instead.

Specified by:
addAll in interface ModifiableCollectionOperator<T>
Parameters:
collection - the collection containing the elements to be added
Returns:
an operator holding the modified target object

removeAllIndexes

ILevel0ArrayOperator<I,T> removeAllIndexes(int... indexes)
Description copied from interface: 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.

Specified by:
removeAllIndexes in interface ModifiableCollectionOperator<T>
Parameters:
indexes - the positions of the elements to be removed
Returns:
an operator holding the modified target object

removeAllEqual

ILevel0ArrayOperator<I,T> removeAllEqual(T... values)
Description copied from interface: ModifiableCollectionOperator

Removes the specified values from the target structure object.

The original target object is not modified, but copied instead.

Specified by:
removeAllEqual in interface ModifiableCollectionOperator<T>
Parameters:
values - the values to be removed from the target.
Returns:
an operator holding the modified target object

removeAllTrue

ILevel0ArrayOperator<I,T> removeAllTrue(IFunction<? super T,Boolean> eval)
Description copied from interface: 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.

Specified by:
removeAllTrue in interface ModifiableCollectionOperator<T>
Parameters:
eval - the evaluator to be used, which must return Boolean
Returns:
an operator holding the modified target object

removeAllFalse

ILevel0ArrayOperator<I,T> removeAllFalse(IFunction<? super T,Boolean> eval)
Description copied from interface: 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.

Specified by:
removeAllFalse in interface ModifiableCollectionOperator<T>
Parameters:
eval - the evaluator to be used, which must return Boolean
Returns:
an operator holding the modified target object

removeAllNullOrFalse

ILevel0ArrayOperator<I,T> removeAllNullOrFalse(IFunction<? super T,Boolean> eval)
Description copied from interface: 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.

Specified by:
removeAllNullOrFalse in interface ModifiableCollectionOperator<T>
Parameters:
eval - the evaluator to be used, which must return Boolean
Returns:
an operator holding the modified target object

removeAllNotNullAndFalse

ILevel0ArrayOperator<I,T> removeAllNotNullAndFalse(IFunction<? super T,Boolean> eval)
Description copied from interface: 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.

Specified by:
removeAllNotNullAndFalse in interface ModifiableCollectionOperator<T>
Parameters:
eval - the evaluator to be used, which must return Boolean
Returns:
an operator holding the modified target object

removeAllNotNullAndTrue

ILevel0ArrayOperator<I,T> removeAllNotNullAndTrue(IFunction<? super T,Boolean> eval)
Description copied from interface: 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.

Specified by:
removeAllNotNullAndTrue in interface ModifiableCollectionOperator<T>
Parameters:
eval - the evaluator to be used, which must return Boolean
Returns:
an operator holding the modified target object

removeAllNullOrTrue

ILevel0ArrayOperator<I,T> removeAllNullOrTrue(IFunction<? super T,Boolean> eval)
Description copied from interface: 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.

Specified by:
removeAllNullOrTrue in interface ModifiableCollectionOperator<T>
Parameters:
eval - the evaluator to be used, which must return Boolean
Returns:
an operator holding the modified target object

removeAllIndexesNot

ILevel0ArrayOperator<I,T> removeAllIndexesNot(int... indexes)
Description copied from interface: 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.

Specified by:
removeAllIndexesNot in interface ModifiableCollectionOperator<T>
Parameters:
indexes - the positions of the elements to be kept
Returns:
an operator holding the modified target object

removeAllNull

ILevel0ArrayOperator<I,T> removeAllNull()
Description copied from interface: ModifiableCollectionOperator

Remove all the null elements in the target structure object.

The original target object is not modified, but copied instead.

Specified by:
removeAllNull in interface ModifiableCollectionOperator<T>
Returns:
an operator holding the modified target object

toList

ILevel0ListOperator<I,T> toList()
Description copied from interface: ConvertibleToListOperator

Converts the current target to a list.

Specified by:
toList in interface ConvertibleToListOperator
Returns:
an operator holding the converted object as target.

toSet

ILevel0SetOperator<I,T> toSet()
Description copied from interface: ConvertibleToSetOperator

Converts the current target into a set.

Specified by:
toSet in interface ConvertibleToSetOperator
Returns:
an operator holding the converted object as target.

toMap

<K,V> ILevel0MapOperator<I,K,V> toMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Description copied from interface: 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).

Specified by:
toMap in interface ConvertibleToMapOperator<T>
Type Parameters:
K - the type of the keys that will be created
V - the type of the values that will be created
Parameters:
mapBuilder - the map builder function to be used
Returns:
an operator holding the converted object as target.

toMap

<K,V> ILevel0MapOperator<I,K,V> toMap(IFunction<? super T,K> keyFunction,
                                      IFunction<? super T,V> valueFunction)
Description copied from interface: 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).

Specified by:
toMap in interface ConvertibleToMapOperator<T>
Type Parameters:
K - the type of the keys that will be created
V - the type of the values that will be created
Parameters:
keyFunction - the function for building the keys
valueFunction - the function for building the values
Returns:
an operator holding the converted object as target.

toGroupMapOf

<K,V> ILevel0MapOperator<I,K,V[]> toGroupMapOf(org.javaruntype.type.Type<V> valueType,
                                               IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Description copied from interface: 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.

Specified by:
toGroupMapOf in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
K - the type of the keys that will be created
V - the type of the values that will be created
Parameters:
valueType - the type of the values, that will be used for instantiating the value arrays
mapBuilder - the map builder function to be used
Returns:
an operator holding the converted object as target.

toGroupMapOf

<K,V> ILevel0MapOperator<I,K,V[]> toGroupMapOf(org.javaruntype.type.Type<V> valueType,
                                               IFunction<? super T,K> keyFunction,
                                               IFunction<? super T,V> valueFunction)
Description copied from interface: 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.

Specified by:
toGroupMapOf in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
K - the type of the keys that will be created
V - the type of the values that will be created
Parameters:
valueType - the type of the values, that will be used for instantiating the value arrays
keyFunction - the function for building the keys
valueFunction - the function for building the values
Returns:
an operator holding the converted object as target.

zipKeys

<K> ILevel0MapOperator<I,K,T> zipKeys(K... keys)
Description copied from interface: 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).

Specified by:
zipKeys in interface ConvertibleToMapOperator<T>
Type Parameters:
K - the type of the keys
Parameters:
keys - the new keys
Returns:
an operator holding the converted object as target.

zipValues

<V> ILevel0MapOperator<I,T,V> zipValues(V... values)
Description copied from interface: 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.

Specified by:
zipValues in interface ConvertibleToMapOperator<T>
Type Parameters:
V - the type of the values
Parameters:
values - the new values
Returns:
an operator holding the converted object as target.

zipKeysFrom

<K> ILevel0MapOperator<I,K,T> zipKeysFrom(Collection<K> keys)
Description copied from interface: 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).

Specified by:
zipKeysFrom in interface ConvertibleToMapOperator<T>
Type Parameters:
K - the type of the keys
Parameters:
keys - the new keys
Returns:
an operator holding the converted object as target.

zipValuesFrom

<V> ILevel0MapOperator<I,T,V> zipValuesFrom(Collection<V> values)
Description copied from interface: 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.

Specified by:
zipValuesFrom in interface ConvertibleToMapOperator<T>
Type Parameters:
V - the type of the values
Parameters:
values - the new values
Returns:
an operator holding the converted object as target.

zipKeysFrom

<K> ILevel0MapOperator<I,K,T> zipKeysFrom(K[] keys)
Description copied from interface: 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).

Specified by:
zipKeysFrom in interface ConvertibleToMapOperator<T>
Type Parameters:
K - the type of the keys
Parameters:
keys - the new keys
Returns:
an operator holding the converted object as target.

zipValuesFrom

<V> ILevel0MapOperator<I,T,V> zipValuesFrom(V[] values)
Description copied from interface: 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.

Specified by:
zipValuesFrom in interface ConvertibleToMapOperator<T>
Type Parameters:
V - the type of the values
Parameters:
values - the new values
Returns:
an operator holding the converted object as target.

zipKeysBy

<K> ILevel0MapOperator<I,K,T> zipKeysBy(IFunction<? super T,K> keyEval)
Description copied from interface: 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).

Specified by:
zipKeysBy in interface ConvertibleToMapOperator<T>
Type Parameters:
K - the type of the keys that will be created
Parameters:
keyEval - the evaluator used for obtaining the keys
Returns:
an operator holding the converted object as target.

zipValuesBy

<V> ILevel0MapOperator<I,T,V> zipValuesBy(IFunction<? super T,V> valueEval)
Description copied from interface: 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).

Specified by:
zipValuesBy in interface ConvertibleToMapOperator<T>
Type Parameters:
V - the type of the values that will be created
Parameters:
valueEval - the evaluator used for obtaining the values
Returns:
an operator holding the converted object as target.

zipAndGroupKeys

<K> ILevel0MapOperator<I,K,T[]> zipAndGroupKeys(K... keys)
Description copied from interface: 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.

Specified by:
zipAndGroupKeys in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
K - the type of the keys that will be created
Parameters:
keys - the keys to be zipped
Returns:
an operator holding the converted object as target.

zipAndGroupValues

<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValues(org.javaruntype.type.Type<V> valueType,
                                                  V... values)
Description copied from interface: 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.

Specified by:
zipAndGroupValues in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
V - the type of the values that will be created
Parameters:
valueType - the type of the values, that will be used for instantiating the value arrays
values - the values to be zipped
Returns:
an operator holding the converted object as target.

zipAndGroupKeysFrom

<K> ILevel0MapOperator<I,K,T[]> zipAndGroupKeysFrom(Collection<K> keys)
Description copied from interface: 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.

Specified by:
zipAndGroupKeysFrom in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
K - the type of the keys that will be created
Parameters:
keys - the keys to be zipped
Returns:
an operator holding the converted object as target.

zipAndGroupValuesFrom

<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValuesFrom(org.javaruntype.type.Type<V> valueType,
                                                      Collection<V> values)
Description copied from interface: 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.

Specified by:
zipAndGroupValuesFrom in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
V - the type of the values that will be created
Parameters:
valueType - the type of the values, that will be used for instantiating the value arrays
values - the values to be zipped
Returns:
an operator holding the converted object as target.

zipAndGroupKeysFrom

<K> ILevel0MapOperator<I,K,T[]> zipAndGroupKeysFrom(K[] keys)
Description copied from interface: 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.

Specified by:
zipAndGroupKeysFrom in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
K - the type of the keys that will be created
Parameters:
keys - the keys to be zipped
Returns:
an operator holding the converted object as target.

zipAndGroupValuesFrom

<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValuesFrom(org.javaruntype.type.Type<V> valueType,
                                                      V[] values)
Description copied from interface: 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.

Specified by:
zipAndGroupValuesFrom in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
V - the type of the values that will be created
Parameters:
valueType - the type of the values, that will be used for instantiating the value arrays
values - the values to be zipped
Returns:
an operator holding the converted object as target.

zipAndGroupKeysBy

<K> ILevel0MapOperator<I,K,T[]> zipAndGroupKeysBy(IFunction<? super T,K> keyEval)
Description copied from interface: 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.

Specified by:
zipAndGroupKeysBy in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
K - the type of the keys that will be created
Parameters:
keyEval - the evaluator used for obtaining the keys
Returns:
an operator holding the converted object as target.

zipAndGroupValuesBy

<V> ILevel0MapOperator<I,T,V[]> zipAndGroupValuesBy(org.javaruntype.type.Type<V> valueType,
                                                    IFunction<? super T,V> valueEval)
Description copied from interface: 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.

Specified by:
zipAndGroupValuesBy in interface ConvertibleToMapOfArrayOperator<T>
Type Parameters:
V - the type of the values that will be created
Parameters:
valueType - the type of the values, that will be used for instantiating the value arrays
valueEval - the evaluator used for obtaining the values
Returns:
an operator holding the converted object as target.

couple

ILevel0MapOperator<I,T,T> couple()
Description copied from interface: ConvertibleToMapOperator

Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values.

Specified by:
couple in interface ConvertibleToMapOperator<T>
Returns:
an operator holding the converted object as target.

coupleAndGroup

ILevel0MapOperator<I,T,T[]> coupleAndGroup()
Description copied from interface: 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.

Specified by:
coupleAndGroup in interface ConvertibleToMapOfArrayOperator<T>
Returns:
an operator holding the converted object as target.

generic

ILevel0GenericUniqOperator<I,T[]> generic()
Description copied from interface: GenerizableOperator

Converts the specialized structure operator into generic operators (with no specific methods for structures - e.g. forEach())

Specified by:
generic in interface GenerizableOperator<I,T[]>
Returns:
a generic operator on the same target object

replaceWith

ILevel0ArrayOperator<I,T> replaceWith(T[] replacement)
Description copied from interface: ReplaceableOperator

Replaces the current target object with the specified replacement.

Specified by:
replaceWith in interface ReplaceableOperator<T[]>
Parameters:
replacement - the object which will replace the current target object.
Returns:
an operator containing the replacement object as target.

replaceIfNullWith

ILevel0ArrayOperator<I,T> replaceIfNullWith(T[] replacement)
Description copied from interface: ReplaceableIfNullOperator

Replaces the current target object with the specified replacement if the current target is null.

Specified by:
replaceIfNullWith in interface ReplaceableIfNullOperator<T[]>
Parameters:
replacement - the object which will replace the current target object if target is null.
Returns:
an operator containing the original target object if it was not null, or the new one if null.

exec

<X> ILevel0GenericUniqOperator<I,X> exec(IFunction<? super T[],X> function)
Description copied from interface: 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.

Specified by:
exec in interface ExecutableArrayOperator<T>
Type Parameters:
X - the type of the result object
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution

execAsArray

ILevel0ArrayOperator<I,T> execAsArray(IFunction<? super T[],? extends T[]> function)
Description copied from interface: 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.

Specified by:
execAsArray in interface ExecutableArrayOperator<T>
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution

execAsArrayOf

<X> ILevel0ArrayOperator<I,X> execAsArrayOf(org.javaruntype.type.Type<X> type,
                                            IFunction<? super T[],X[]> function)
Description copied from interface: 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.

Specified by:
execAsArrayOf in interface ExecutableArrayOperator<T>
Type Parameters:
X - the type of the result elements
Parameters:
type - the new type for the operator
function - the function to be executed
Returns:
an operator on the results of function execution

execIfNotNullAsArray

ILevel0ArrayOperator<I,T> execIfNotNullAsArray(IFunction<? super T[],? extends T[]> function)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNotNullAsArray in interface ExecutableArrayOperator<T>
Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfNullAsArray

ILevel0ArrayOperator<I,T> execIfNullAsArray(IFunction<? super T[],? extends T[]> function)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNullAsArray in interface ExecutableArrayOperator<T>
Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfTrueAsArray

ILevel0ArrayOperator<I,T> execIfTrueAsArray(IFunction<? super T[],Boolean> eval,
                                            IFunction<? super T[],? extends T[]> function)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfTrueAsArray in interface ExecutableArrayOperator<T>
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfFalseAsArray

ILevel0ArrayOperator<I,T> execIfFalseAsArray(IFunction<? super T[],Boolean> eval,
                                             IFunction<? super T[],? extends T[]> function)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfFalseAsArray in interface ExecutableArrayOperator<T>
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

execIfNotNullAsArrayOf

<X> ILevel0ArrayOperator<I,X> execIfNotNullAsArrayOf(org.javaruntype.type.Type<X> type,
                                                     IFunction<? super T[],X[]> function,
                                                     IFunction<? super T[],X[]> elseFunction)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNotNullAsArrayOf in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfNullAsArrayOf

<X> ILevel0ArrayOperator<I,X> execIfNullAsArrayOf(org.javaruntype.type.Type<X> type,
                                                  IFunction<? super T[],X[]> function,
                                                  IFunction<? super T[],X[]> elseFunction)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfNullAsArrayOf in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfTrueAsArrayOf

<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)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfTrueAsArrayOf in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

execIfFalseAsArrayOf

<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)
Description copied from interface: ExecutableArrayOperator

Executes a function in a way equivalent to ExecutableArrayOperator.execAsArray(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
execIfFalseAsArrayOf in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

map

ILevel0ArrayOperator<I,T> map(IFunction<? super T,? extends T> function)
Description copied from interface: 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().

Specified by:
map in interface ExecutableArrayOperator<T>
Parameters:
function - the function to be executed
Returns:
an operator on the results of function execution on each element

map

<X> ILevel0ArrayOperator<I,X> map(org.javaruntype.type.Type<X> type,
                                  IFunction<? super T,X> function)
Description copied from interface: 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().

Specified by:
map in interface ExecutableArrayOperator<T>
Type Parameters:
X - the type of the result elements
Parameters:
type - the new type for the operator
function - the function to be executed
Returns:
an operator on the results of function execution on each element

mapIfNotNull

ILevel0ArrayOperator<I,T> mapIfNotNull(IFunction<? super T,? extends T> function)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfNotNull in interface ExecutableArrayOperator<T>
Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

mapIfNull

ILevel0ArrayOperator<I,T> mapIfNull(IFunction<? super T,? extends T> function)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfNull in interface ExecutableArrayOperator<T>
Parameters:
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

mapIfTrue

ILevel0ArrayOperator<I,T> mapIfTrue(IFunction<? super T,Boolean> eval,
                                    IFunction<? super T,? extends T> function)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfTrue in interface ExecutableArrayOperator<T>
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

mapIfFalse

ILevel0ArrayOperator<I,T> mapIfFalse(IFunction<? super T,Boolean> eval,
                                     IFunction<? super T,? extends T> function)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfFalse in interface ExecutableArrayOperator<T>
Parameters:
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
Returns:
an operator on the results of function execution

mapIfNotNull

<X> ILevel0ArrayOperator<I,X> mapIfNotNull(org.javaruntype.type.Type<X> type,
                                           IFunction<? super T,X> function,
                                           IFunction<? super T,X> elseFunction)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfNotNull in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

mapIfNull

<X> ILevel0ArrayOperator<I,X> mapIfNull(org.javaruntype.type.Type<X> type,
                                        IFunction<? super T,X> function,
                                        IFunction<? super T,X> elseFunction)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfNull in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

mapIfTrue

<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)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfTrue in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

mapIfFalse

<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)
Description copied from interface: ExecutableArrayOperator

Maps a function in a way equivalent to ExecutableArrayOperator.map(IFunction) but only on selected elements, leaving all other elements untouched.

Specified by:
mapIfFalse in interface ExecutableArrayOperator<T>
Type Parameters:
X - the new type returned by the functions
Parameters:
type - the new type returned by the functions
eval - the evaluation function used to select elements
function - the function to be executed on the selected elements
elseFunction - the function to be executed on the non-selected elements
Returns:
an operator on the results of function execution

of

<X> ILevel0ArrayOperator<I,X> of(org.javaruntype.type.Type<X> type)
Description copied from interface: CastableToArrayOperator

Casts the operator's target as an array of the specified type.

Specified by:
of in interface CastableToArrayOperator
Type Parameters:
X - the type of the elements of the array
Parameters:
type - the type of the elements of the array
Returns:
the resulting casted operator

castToArrayOf

<X> ILevel0ArrayOperator<I,X> castToArrayOf(org.javaruntype.type.Type<X> type)
Description copied from interface: CastableToArrayOperator

Casts the operator's target as an array of the specified type.

Specified by:
castToArrayOf in interface CastableToArrayOperator
Type Parameters:
X - the type of the elements of the array
Parameters:
type - the type of the elements of the array
Returns:
the resulting casted operator

any

ILevel0GenericUniqOperator<I,Boolean> any(IFunction<? super T,Boolean> eval)
Specified by:
any in interface TotalizableOperator<I,T>

all

ILevel0GenericUniqOperator<I,Boolean> all(IFunction<? super T,Boolean> eval)
Specified by:
all in interface TotalizableOperator<I,T>

reverse

ILevel0ArrayOperator<I,T> reverse()
Description copied from interface: ReversibleOperator

Reverses the elements of the structure.

Specified by:
reverse in interface ReversibleOperator<T>
Returns:
an operator containing the reversed structure as target object.


Copyright © 2012 The OP4J team. All Rights Reserved.