Class ValueRecorder
java.lang.Object
net.sf.colossus.util.ValueRecorder
- All Implemented Interfaces:
IValueRecorderItem
An integer value, along with a detailed record of how and why
the value has the value it has.
- Author:
- Romain Dolbeau
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAugment the value.voidadd(ValueRecorder v) Augment the value.intgetValue()Get the value.booleanisEmpty()booleanisReset()voidReset the value to a specific value.voidsetScale(float scale) toString()Get the detailed explanations and final value as String.
-
Field Details
-
value
private int valueThe current value -
scale
private float scale -
desc
-
items
All the explanations and value changes
-
-
Constructor Details
-
ValueRecorder
public ValueRecorder() -
ValueRecorder
-
-
Method Details
-
isReset
public boolean isReset()- Specified by:
isResetin interfaceIValueRecorderItem
-
add
Augment the value.- Parameters:
v- By how much the value change.r- The reason of the change.
-
add
Augment the value.- Parameters:
v- By how much the value change, and why
-
resetTo
Reset the value to a specific value.- Parameters:
v- The new value to use.r- The reason of the change.
-
getValue
public int getValue()Get the value.- Specified by:
getValuein interfaceIValueRecorderItem- Returns:
- The current value.
-
setScale
public void setScale(float scale) -
isEmpty
public boolean isEmpty() -
getWhy
- Specified by:
getWhyin interfaceIValueRecorderItem
-
getFull
- Specified by:
getFullin interfaceIValueRecorderItem
-
toString
-