Package algorithm.inhereitance

Source Code of algorithm.inhereitance.SummingAggregator

package algorithm.inhereitance;

import static algorithm.MeasurementUtil.sumX;
import static algorithm.MeasurementUtil.sumY;

import java.util.Collection;

import algorithm.Measurement;

public class SummingAggregator extends PointsAggregator {

  public SummingAggregator(Collection<Measurement> measurements) {
    super(measurements);
  }

  @Override
  protected Collection<Measurement> filterMeasurements() {
    return measurements;
  }

  @Override
  protected Measurement aggregateMeasurements() {
    return new Measurement(sumX(measurements), sumY(measurements));
  }
}
TOP

Related Classes of algorithm.inhereitance.SummingAggregator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.