public class TrailingAverage extends Object
| Constructor and Description |
|---|
TrailingAverage()
Creates a trailing average instance with the default number of
values used to compute the average (10).
|
TrailingAverage(int history)
Creates a trailing average instance with the specified number of
values used to compute the average.
|
| Modifier and Type | Method and Description |
|---|---|
void |
record(int value)
Records a new value.
|
String |
toString() |
int |
value()
Returns the current averaged value.
|
public TrailingAverage()
public TrailingAverage(int history)
Copyright © 2015. All rights reserved.