public final class DoubleSummary extends Object implements Serializable
DoubleSummaryStatistics, 
Serialized Form| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object obj) | 
| long | getCount()Returns the count of values recorded. | 
| double | getMax()Return the maximum value recorded, or  Double.NEGATIVE_INFINITYif
 no values have been recorded. | 
| double | getMean()Return the arithmetic mean of values recorded, or zero if no values have
 been recorded. | 
| double | getMin()Return the minimum value recorded, or  Double.POSITIVE_INFINITYif
 no values have been recorded. | 
| double | getSum()Return the sum of values recorded, or zero if no values have been
 recorded. | 
| int | hashCode() | 
| static DoubleSummary | of(DoubleSummaryStatistics statistics)Return a new value object of the statistical summary, currently
 represented by the  statisticsobject. | 
| static DoubleSummary | of(long count,
  double min,
  double max,
  double sum,
  double mean)Create an immutable object which contains statistical summary values. | 
| static <T> Collector<T,?,DoubleSummary> | toDoubleSummary(ToDoubleFunction<? super T> mapper)Return a  Collectorwhich applies an double-producing mapping
 function to each input element, and returns summary-statistics for the
 resulting values. | 
| String | toString() | 
public long getCount()
public double getMin()
Double.POSITIVE_INFINITY if
 no values have been recorded.Double.POSITIVE_INFINITY if nonepublic double getMax()
Double.NEGATIVE_INFINITY if
 no values have been recorded.Double.NEGATIVE_INFINITY if nonepublic double getSum()
public double getMean()
public static DoubleSummary of(long count, double min, double max, double sum, double mean)
count - the count of values recordedmin - the minimum valuemax - the maximum valuesum - the sum of the recorded valuesmean - the arithmetic mean of valuespublic static DoubleSummary of(DoubleSummaryStatistics statistics)
statistics object.statistics - the creating (mutable) statistics classpublic static <T> Collector<T,?,DoubleSummary> toDoubleSummary(ToDoubleFunction<? super T> mapper)
Collector which applies an double-producing mapping
 function to each input element, and returns summary-statistics for the
 resulting values.
 
 final Stream<SomeObject> stream = ...
 final DoubleSummary summary = stream
     .collect(toDoubleSummary(v -> v.doubleValue()));T - the type of the input elementsmapper - a mapping function to apply to each elementCollector implementing the summary-statistics reductionNullPointerException - if the given mapper is
         null© 2007-2014 Franz Wilhelmstötter (2014-12-28 10:45)