Package com.jadice.web.util.base.shared
Class ValueHistory
java.lang.Object
com.jadice.web.util.base.shared.ValueHistory
Saves the last n Values and can calculate the average of it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(float value) voidclear()floatgetAvg()voidsetCapacity(int capacity)
-
Constructor Details
-
ValueHistory
public ValueHistory() -
ValueHistory
public ValueHistory(int capacity)
-
-
Method Details
-
setCapacity
public void setCapacity(int capacity) -
clear
public void clear() -
add
public void add(float value) -
getAvg
public float getAvg()
-