public class GroupByPipe<S,K,V> extends AbstractPipe<S,S> implements SideEffectPipe.GreedySideEffectPipe<S,Map<K,List<V>>>
SideEffectPipe.GreedySideEffectPipe<S,T>, SideEffectPipe.LazySideEffectPipe<S,T>| Modifier and Type | Field and Description |
|---|---|
protected Map<K,Collection<V>> |
byMap |
protected PipeFunction<S,K> |
keyFunction |
protected PipeFunction<S,V> |
valueFunction |
currentEnd, pathEnabled, startsNO_PATH_MESSAGE| Constructor and Description |
|---|
GroupByPipe(Map<K,Collection<V>> byMap,
PipeFunction<S,K> keyFunction,
PipeFunction<S,V> valueFunction) |
GroupByPipe(PipeFunction<S,K> keyFunction,
PipeFunction<S,V> valueFunction) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(V value,
Collection values) |
protected K |
getKey(S start) |
Map |
getSideEffect() |
protected V |
getValue(S start) |
protected S |
processNextStart() |
void |
reset()
A pipe may maintain state.
|
enablePath, getCurrentPath, getPathToHere, hasNext, iterator, next, remove, setStarts, setStarts, setStarts, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitenablePath, getCurrentPath, setStarts, setStartsprotected Map<K,Collection<V>> byMap
protected final PipeFunction<S,K> keyFunction
protected final PipeFunction<S,V> valueFunction
public GroupByPipe(Map<K,Collection<V>> byMap, PipeFunction<S,K> keyFunction, PipeFunction<S,V> valueFunction)
public GroupByPipe(PipeFunction<S,K> keyFunction, PipeFunction<S,V> valueFunction)
protected S processNextStart()
processNextStart in class AbstractPipe<S,S>public Map getSideEffect()
getSideEffect in interface SideEffectPipe<S,Map<K,List<V>>>public void addValue(V value, Collection values)
public void reset()
PipeCopyright © 2010-2014. All Rights Reserved.