Q
- public class QuantitySummaryStatistics<Q extends javax.measure.Quantity<Q>> extends Object
Modifier and Type | Method and Description |
---|---|
void |
accept(javax.measure.Quantity<Q> quantity)
Records another value into the summary information.
|
QuantitySummaryStatistics<Q> |
combine(QuantitySummaryStatistics<Q> quantitySummary)
Combines the state of another
QuantitySummaryStatistics into this one. |
boolean |
equals(Object obj)
will equals when the unit were equals
|
javax.measure.Quantity<Q> |
getAverage()
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 |
getCount()
Get the number of items added to this summary instance.
|
javax.measure.Quantity<Q> |
getMax()
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> |
getMin()
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> |
getSum()
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 |
hashCode() |
QuantitySummaryStatistics<Q> |
to(javax.measure.Unit<Q> unit)
convert the summary to this unit measure
|
String |
toString() |
public void accept(javax.measure.Quantity<Q> quantity)
quantity
- the input quantity value to be added, not null.public QuantitySummaryStatistics<Q> combine(QuantitySummaryStatistics<Q> quantitySummary)
QuantitySummaryStatistics
into this one.quantitySummary
- another QuantitySummaryStatistics
, not null.public long getCount()
public javax.measure.Quantity<Q> getMin()
public javax.measure.Quantity<Q> getMin(javax.measure.Unit<Q> unit)
unit
- to convertpublic javax.measure.Quantity<Q> getMax()
public javax.measure.Quantity<Q> getMax(javax.measure.Unit<Q> unit)
unit
- to convertpublic javax.measure.Quantity<Q> getSum()
public javax.measure.Quantity<Q> getSum(javax.measure.Unit<Q> unit)
unit
- to convertpublic javax.measure.Quantity<Q> getAverage()
public javax.measure.Quantity<Q> getAverage(javax.measure.Unit<Q> unit)
unit
- to convertpublic QuantitySummaryStatistics<Q> to(javax.measure.Unit<Q> unit)
unit
- to convert the summaryCopyright © 2005–2018 Units of Measurement project. All rights reserved.