|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConvertibleToMapOperator<T>
This interface contains methods for conversions to map.
Method Summary | ||
---|---|---|
Operator |
couple()
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values. |
|
|
toMap(IFunction<? super T,K> keyFunction,
IFunction<? super T,V> valueFunction)
Converts the target object to a map by inputting the original target's elements into the specified functions, which will create the resulting keys and values. |
|
|
toMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. |
|
|
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 |
---|
Operator couple()
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values.
<K> Operator 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.
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).
K
- the type of the keys that will be createdkeyEval
- the evaluator used for obtaining the keys
<V> Operator 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.
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).
V
- the type of the values that will be createdvalueEval
- the evaluator used for obtaining the values
<K> Operator 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.
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).
K
- the type of the keyskeys
- the new keys
<V> Operator 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
- the type of the valuesvalues
- the new values
<K> Operator 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.
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).
K
- the type of the keyskeys
- the new keys
<V> Operator 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
- the type of the valuesvalues
- the new values
<K> Operator 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.
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).
K
- the type of the keyskeys
- the new keys
<V> Operator 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.
V
- the type of the valuesvalues
- the new values
<K,V> Operator 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.
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).
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> Operator 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.
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).
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |