| Constructor and Description |
|---|
FunctionalUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> java.util.Map<K,Pair<java.util.List<V>,java.util.List<V>>> |
cogroup(java.util.List<Pair<K,V>> left,
java.util.List<Pair<K,V>> right)
For each key in left and right, cogroup returns the list of values
as a pair for each value present in left as well as right.
|
static <K,V> java.util.Map<K,java.util.List<V>> |
groupByKey(java.util.List<Pair<K,V>> listInput)
Group the input pairs by the key of each pair.
|
static <K,V> java.util.List<Pair<K,V>> |
mapToPair(java.util.Map<K,V> map)
Convert a map with a set of entries of type K for key
and V for value in to a list of
Pair |
public static <K,V> java.util.Map<K,Pair<java.util.List<V>,java.util.List<V>>> cogroup(java.util.List<Pair<K,V>> left, java.util.List<Pair<K,V>> right)
K - the key typeV - the value typeleft - the left list of pairs to joinright - the right list of pairs to joinpublic static <K,V> java.util.Map<K,java.util.List<V>> groupByKey(java.util.List<Pair<K,V>> listInput)
K - the key typeV - the value typelistInput - the list of pairs to grouppublic static <K,V> java.util.List<Pair<K,V>> mapToPair(java.util.Map<K,V> map)
PairK - the key typeV - the value typemap - the map to collapseListCopyright © 2019. All rights reserved.