public class Average extends Object implements Streamable
| Modifier and Type | Field and Description |
|---|---|
protected double |
avg |
protected long |
count |
| Constructor and Description |
|---|
Average() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Average> |
add(long num) |
double |
average() |
void |
clear() |
long |
count() |
double |
getAverage() |
long |
getCount() |
<T extends Average> |
merge(T other)
Merges this average with another one
|
void |
readFrom(DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
String |
toString() |
void |
writeTo(DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
public <T extends Average> T add(long num)
public <T extends Average> T merge(T other)
public double getAverage()
public double average()
public long getCount()
public long count()
public void clear()
public void writeTo(DataOutput out) throws Exception
StreamablewriteTo in interface StreamableExceptionpublic void readFrom(DataInput in) throws Exception
StreamablereadFrom in interface StreamableExceptionCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.