Class 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 Detail

      • WeightedValue

        public WeightedValue​(Number value,
                             double weight)
    • Method Detail

      • 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