util
Class UncertainValue
java.lang.Object
|
+--util.Value
|
+--util.UncertainValue
- Direct Known Subclasses:
- DeviceState
- public class UncertainValue
- extends Value
This class can be used to encapsulate a response that you are not
sure of. I created it thinking of device control -- when you ask
for the status of a device, some controllers are more sure of their
answers than others and I thought it would be good to include this
certainty with the actual response.
- See Also:
Serializable
, Serialized Form
Methods inherited from class util.Value |
clone,
equals,
equals,
equals,
equals,
getBooleanValue,
getIntValue,
getStringValue,
getValue,
setValue,
setValue,
setValue,
valueEquals,
valueModified |
CERTAIN
public static final int CERTAIN
ALMOST_CERTAIN
public static final int ALMOST_CERTAIN
ASSUMED
public static final int ASSUMED
GUESS
public static final int GUESS
UNKNOWN
public static final int UNKNOWN
confidence
protected int confidence
UncertainValue
public UncertainValue()
UncertainValue
public UncertainValue(Object value,
int confidence)
UncertainValue
public UncertainValue(boolean value,
int confidence)
UncertainValue
public UncertainValue(int value,
int confidence)
getConfidence
public int getConfidence()
setConfidence
public void setConfidence(int c)
toString
public String toString()
- Overrides:
- toString in class Value