Class WeightedValue

java.lang.Object
org.heigit.ohsome.oshdb.api.generic.WeightedValue

public class WeightedValue extends Object
Immutable object that stores a numeric value and an associated weight. Used to specify data input for the calculation of weighted averages.
  • Constructor Details

    • WeightedValue

      public WeightedValue(Number value, double weight)
  • Method Details

    • getValue

      public Number getValue()
      Returns the stored numeric value.
      Returns:
      the stored numeric value
    • getWeight

      public double getWeight()
      Returns the stored weight.
      Returns:
      the value's associated weight