public class Reducers
extends java.lang.Object
PQueueX<Integer> q = Reducers.<Integer>toPQueueX()
.mapReduce(Stream.of(1,2,3,4));
Use with care, as the mapReduce method is not type safeConstructor and Description |
---|
Reducers() |
Modifier and Type | Method and Description |
---|---|
static Reducer<java.lang.Double> |
toCountDouble() |
static Reducer<java.lang.Integer> |
toCountInt() |
static <T> Reducer<org.pcollections.PBag<T>> |
toPBag()
PBag<Integer> q = Reducers.<Integer>toPBag()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<PBagX<T>> |
toPBagX()
PBagX<Integer> q = Reducers.<Integer>toPBagX()
.mapReduce(Stream.of(1,2,3,4));
|
static <K,V> Reducer<org.pcollections.PMap<K,V>> |
toPMap()
PMap<Integer,String> q = Reducers.<Integer,String>toPMap()
.mapReduce(Stream.of(Arrays.asList("hello",1),Arrays.asList("world",2)));
|
static <K,V> Reducer<PMapX<K,V>> |
toPMapX()
PMapX<Integer,String> q = Reducers.<Integer,String>toPMapX()
.mapReduce(Stream.of(Arrays.asList("hello",1),Arrays.asList("world",2)));
|
static <T> Reducer<org.pcollections.POrderedSet<T>> |
toPOrderedSet()
POrderedSet<Integer> q = Reducers.<Integer>toPOrderedSet()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<POrderedSetX<T>> |
toPOrderedSetX()
POrderedSetX<Integer> q = Reducers.<Integer>toPOrderedSetX()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<org.pcollections.PQueue<T>> |
toPQueue()
PQueue<Integer> q = Reducers.<Integer>toPQueue()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<PQueueX<T>> |
toPQueueX()
PQueueX<Integer> q = Reducers.<Integer>toPQueueX()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<org.pcollections.PSet<T>> |
toPSet()
PSet<Integer> q = Reducers.<Integer>toPSet()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<PSetX<T>> |
toPSetX()
PSetX<Integer> q = Reducers.<Integer>toPSetX()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<org.pcollections.PStack<T>> |
toPStack()
PStack<Integer> q = Reducers.<Integer>toPStack()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<org.pcollections.PStack<T>> |
toPStackReversed()
PStack<Integer> q = Reducers.<Integer>toPStackReversed()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<PStackX<T>> |
toPStackX()
PStackX<Integer> q = Reducers.<Integer>toPStackX()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<org.pcollections.PVector<T>> |
toPVector()
PVector<Integer> q = Reducers.<Integer>toPVector()
.mapReduce(Stream.of(1,2,3,4));
|
static <T> Reducer<PVectorX<T>> |
toPVectorX()
PVectorX<Integer> q = Reducers.<Integer>toPVectorX()
.mapReduce(Stream.of(1,2,3,4));
|
static Monoid<java.lang.String> |
toString(java.lang.String joiner)
Monoid for String concatonation
|
static Monoid<java.lang.Double> |
toTotalDouble() |
static Monoid<java.lang.Integer> |
toTotalInt() |
public static <T> Reducer<PQueueX<T>> toPQueueX()
PQueueX<Integer> q = Reducers.<Integer>toPQueueX()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<POrderedSetX<T>> toPOrderedSetX()
POrderedSetX<Integer> q = Reducers.<Integer>toPOrderedSetX()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<PSetX<T>> toPSetX()
PSetX<Integer> q = Reducers.<Integer>toPSetX()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<PStackX<T>> toPStackX()
PStackX<Integer> q = Reducers.<Integer>toPStackX()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<PVectorX<T>> toPVectorX()
PVectorX<Integer> q = Reducers.<Integer>toPVectorX()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<PBagX<T>> toPBagX()
PBagX<Integer> q = Reducers.<Integer>toPBagX()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<org.pcollections.PQueue<T>> toPQueue()
PQueue<Integer> q = Reducers.<Integer>toPQueue()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<org.pcollections.POrderedSet<T>> toPOrderedSet()
POrderedSet<Integer> q = Reducers.<Integer>toPOrderedSet()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<org.pcollections.PBag<T>> toPBag()
PBag<Integer> q = Reducers.<Integer>toPBag()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<org.pcollections.PSet<T>> toPSet()
PSet<Integer> q = Reducers.<Integer>toPSet()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<org.pcollections.PVector<T>> toPVector()
PVector<Integer> q = Reducers.<Integer>toPVector()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<org.pcollections.PStack<T>> toPStack()
PStack<Integer> q = Reducers.<Integer>toPStack()
.mapReduce(Stream.of(1,2,3,4));
public static <T> Reducer<org.pcollections.PStack<T>> toPStackReversed()
PStack<Integer> q = Reducers.<Integer>toPStackReversed()
.mapReduce(Stream.of(1,2,3,4));
public static <K,V> Reducer<org.pcollections.PMap<K,V>> toPMap()
PMap<Integer,String> q = Reducers.<Integer,String>toPMap()
.mapReduce(Stream.of(Arrays.asList("hello",1),Arrays.asList("world",2)));
public static <K,V> Reducer<PMapX<K,V>> toPMapX()
PMapX<Integer,String> q = Reducers.<Integer,String>toPMapX()
.mapReduce(Stream.of(Arrays.asList("hello",1),Arrays.asList("world",2)));
public static Monoid<java.lang.String> toString(java.lang.String joiner)
joiner
- String combinerpublic static Monoid<java.lang.Integer> toTotalInt()
public static Reducer<java.lang.Integer> toCountInt()
public static Monoid<java.lang.Double> toTotalDouble()
public static Reducer<java.lang.Double> toCountDouble()