|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILevel0IndefiniteArrayOperator<I,T>
Method Summary | ||
---|---|---|
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. |
|
|
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. |
|
ILevel0GenericUniqOperator<I,T[]> |
generic()
Converts the specialized structure operator into generic operators (with no specific methods for structures - e.g. forEach()) |
|
|
of(org.javaruntype.type.Type<X> type)
Casts the operator's target as an array of the specified type. |
|
ILevel0IndefiniteArrayOperator<I,T> |
reverse()
Reverses the elements of the structure. |
|
|
toGroupMapOf(org.javaruntype.type.Type<V> valueType,
IFunction<? super T,K> keyFunction,
IFunction<? super T,V> valueFunction)
|
|
|
toGroupMapOf(org.javaruntype.type.Type<V> valueType,
IFunction<? super T,Map.Entry<K,V>> mapBuilder)
|
|
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. |
|
|
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. |
|
|
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. |
Methods inherited from interface org.op4j.operators.qualities.CastableToArrayOperator |
---|
castToArrayOf |
Methods inherited from interface org.op4j.operators.qualities.ConvertibleToMapOperator |
---|
zipKeysFrom, zipKeysFrom, zipValuesFrom, zipValuesFrom |
Method Detail |
---|
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)
<K,V> ILevel0MapOperator<I,K,V[]> toGroupMapOf(org.javaruntype.type.Type<V> valueType, IFunction<? super T,K> keyFunction, IFunction<? super T,V> valueFunction)
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>
<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> 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
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[]>
<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> ILevel0GenericUniqOperator<I,X> exec(IFunction<? super T[],X> function)
ExecutableIndefiniteArrayOperator
Executes the specified function on the target object, creating a new generic operator containing the result of the execution.
This function must be able to take as input an array of type T (the current operator's target type) and will return an object of type X, which will be from then on the new operator's target type.
exec
in interface ExecutableIndefiniteArrayOperator<I,T>
X
- the type of the result, and new type for the operatorfunction
- the function to be executed
ILevel0IndefiniteArrayOperator<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 |