All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fluxtion.runtime.dataflow.groupby.GroupByReduceFlowFunction Maven / Gradle / Ivy

package com.fluxtion.runtime.dataflow.groupby;

import com.fluxtion.runtime.dataflow.aggregate.AggregateFlowFunction;
import lombok.Value;

@Value
public class GroupByReduceFlowFunction {

    AggregateFlowFunction aggregateFunction;

    public  R reduceValues(GroupBy inputMap) {
        aggregateFunction.reset();
        inputMap.toMap().values().forEach(aggregateFunction::aggregate);
        return (R) aggregateFunction.get();
    }

    public Object reduceValues(Object inputMap) {
        return reduceValues((GroupBy) inputMap);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy