Class AggNatural<I, E, C extends Collection<I>>
java.lang.Object
org.aksw.commons.collector.core.AggNatural<I,E,C>
- Type Parameters:
I-C-
- All Implemented Interfaces:
Serializable, Aggregator<I,E, C>, ParallelAggregator<I, E, C, Accumulator<I, E, C>>
public class AggNatural<I, E, C extends Collection<I>>
extends Object
implements ParallelAggregator<I, E, C, Accumulator<I,E,C>>, Serializable
Wrapper for a supplier of accumulators with signature I -> Collection<I>
This means, that items from the collection can be used as input. This allows
for 'natural' combination of accumulators by adding the items of one accumulator to the other.
Note that this is operation always works for accumulators of that signature,
yet whether it is semantically meaningful depends on the application context.
- Author:
- raven
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccumulator<I, E, C> combine(Accumulator<I, E, C> a, Accumulator<I, E, C> b) Combine accumulators.Accumulator<I, E, C> booleaninthashCode()Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Aggregator
accumulateAll, accumulateAll, accumulateAll, finishMethods inherited from interface ParallelAggregator
asCollector, asCollector, combineRaw
-
Field Details
-
accSupplier
-
-
Constructor Details
-
AggNatural
-
-
Method Details
-
createAccumulator
- Specified by:
createAccumulatorin interfaceAggregator<I, E, C extends Collection<I>>- Specified by:
createAccumulatorin interfaceParallelAggregator<I, E, C extends Collection<I>, Accumulator<I, E, C extends Collection<I>>>
-
combine
Description copied from interface:ParallelAggregatorCombine accumulators. This method is allowed to mutate any of if its arguments, hence accumulators should be considered exhausted after combination.- Specified by:
combinein interfaceParallelAggregator<I, E, C extends Collection<I>, Accumulator<I, E, C extends Collection<I>>>- Parameters:
a- First participant of combinationb- Second participant of combination- Returns:
- Combined accumulator
-
hashCode
-
equals
-