Class QuantitySummaryStatistics<Q extends javax.measure.Quantity<Q>>

java.lang.Object
tech.units.indriya.function.QuantitySummaryStatistics<Q>
Type Parameters:
Q -

public class QuantitySummaryStatistics<Q extends javax.measure.Quantity<Q>> extends Object
Since:
1.0
Version:
1.0
Author:
Otavio, Werner
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(javax.measure.Quantity<Q> quantity)
    Records another value into the summary information.
    Combines the state of another QuantitySummaryStatistics into this one.
    boolean
    will equals when the unit were equals
    javax.measure.Quantity<Q>
    Get the quantity average of all amounts added.
    javax.measure.Quantity<Q>
    getAverage(javax.measure.Unit<Q> unit)
    Get the quantity average of all amounts added converted to unit
    long
    Get the number of items added to this summary instance.
    javax.measure.Quantity<Q>
    Get the maximal amount found within this summary.
    javax.measure.Quantity<Q>
    getMax(javax.measure.Unit<Q> unit)
    Get the maximal amount found within this summary converted to unit
    javax.measure.Quantity<Q>
    Get the minimal quantity found within this summary.
    javax.measure.Quantity<Q>
    getMin(javax.measure.Unit<Q> unit)
    Get the minimal quantity found within this summary converted to unit
    javax.measure.Quantity<Q>
    Get the sum of all amounts within this summary.
    javax.measure.Quantity<Q>
    getSum(javax.measure.Unit<Q> unit)
    Get the sum of all amounts within this summary converted to unit
    int
     
    to(javax.measure.Unit<Q> unit)
    convert the summary to this unit measure
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • accept

      public void accept(javax.measure.Quantity<Q> quantity)
      Records another value into the summary information.
      Parameters:
      quantity - the input quantity value to be added, not null.
    • combine

      Combines the state of another QuantitySummaryStatistics into this one.
      Parameters:
      quantitySummary - another QuantitySummaryStatistics, not null.
    • getCount

      public long getCount()
      Get the number of items added to this summary instance.
      Returns:
      the number of summarized items, >= 0.
    • getMin

      public javax.measure.Quantity<Q> getMin()
      Get the minimal quantity found within this summary.
      Returns:
      the minimal quantity
    • getMin

      public javax.measure.Quantity<Q> getMin(javax.measure.Unit<Q> unit)
      Get the minimal quantity found within this summary converted to unit
      Parameters:
      unit - to convert
      Returns:
      the minimal quantity converted to this unit
    • getMax

      public javax.measure.Quantity<Q> getMax()
      Get the maximal amount found within this summary.
      Returns:
      the maximal quantity
    • getMax

      public javax.measure.Quantity<Q> getMax(javax.measure.Unit<Q> unit)
      Get the maximal amount found within this summary converted to unit
      Parameters:
      unit - to convert
      Returns:
      the maximal quantity converted to this unit
    • getSum

      public javax.measure.Quantity<Q> getSum()
      Get the sum of all amounts within this summary.
      Returns:
      the total amount
    • getSum

      public javax.measure.Quantity<Q> getSum(javax.measure.Unit<Q> unit)
      Get the sum of all amounts within this summary converted to unit
      Parameters:
      unit - to convert
      Returns:
      the total amount converted to this unit
    • getAverage

      public javax.measure.Quantity<Q> getAverage()
      Get the quantity average of all amounts added.
      Returns:
      the quantity average quantity
    • getAverage

      public javax.measure.Quantity<Q> getAverage(javax.measure.Unit<Q> unit)
      Get the quantity average of all amounts added converted to unit
      Parameters:
      unit - to convert
      Returns:
      the average quantity converted to this unit
    • to

      public QuantitySummaryStatistics<Q> to(javax.measure.Unit<Q> unit)
      convert the summary to this unit measure
      Parameters:
      unit - to convert the summary
      Returns:
      the summary converted to this unit
    • equals

      public boolean equals(Object obj)
      will equals when the unit were equals
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object