LongSummaryStatistics (Java SE 26 & JDK 26)
- All Implemented Interfaces:
IntConsumer, LongConsumer
-
Constructor Summary
Constructors
Constructs an empty instance with zero count, zero sum,
Long.MAX_VALUEmin,Long.MIN_VALUEmax and zero average.LongSummaryStatistics(long count, long min, long max, long sum) Constructs a non-empty instance with the specified
count,min,max, andsum. -
Method Summary
voidaccept(int value) Records a new
intvalue into the summary information.voidaccept(long value) Records a new
longvalue into the summary information.voidCombines the state of another
LongSummaryStatisticsinto this one.final doubleReturns the arithmetic mean of values recorded, or zero if no values have been recorded.
final longgetCount()Returns the count of values recorded.
final longgetMax()Returns the maximum value recorded, or
Long.MIN_VALUEif no values have been recordedfinal longgetMin()Returns the minimum value recorded, or
Long.MAX_VALUEif no values have been recorded.final longgetSum()Returns the sum of values recorded, or zero if no values have been recorded.
toString()Returns a non-empty string representation of this object suitable for debugging.
Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
booleanIndicates whether some other object is "equal to" this one.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.intReturns a hash code value for this object.
final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
Methods declared in interface IntConsumer
Returns a composed
IntConsumerthat performs, in sequence, this operation followed by theafteroperation.Methods declared in interface LongConsumer
Returns a composed
LongConsumerthat performs, in sequence, this operation followed by theafteroperation.
-
Constructor Details
-
LongSummaryStatistics
-
LongSummaryStatistics
-
-
Method Details
-
accept
-
accept
-
combine
-
getCount
-
getSum
-
getMin
-
getMax
-
getAverage
-
toString
-