|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.agena.minerva.util.model.DataPoint
public class DataPoint
A DataPoint represents a single numerical value. The numerical value that a DataPoint encapsulates has double precision.
Typically, a DataPoint is used to express a single probability value of an ExtendedState (or a single piece of evidence entered on it).
Field Summary | |
---|---|
protected int |
connObjectId
The unique identifier of the object (e.g. |
protected java.lang.String |
label
The label for this DataPoint. |
protected double |
value
The actual value encapsulated by this DataPoint. |
static double |
version
|
Fields inherited from interface uk.co.agena.minerva.util.model.Writable |
---|
FIELD_SEPARATOR |
Constructor Summary | |
---|---|
DataPoint()
Default constructor. |
|
DataPoint(double value)
|
|
DataPoint(java.lang.String label)
|
|
DataPoint(java.lang.String label,
double value,
int connObjectId)
Creates a DataPoint with the specified label, connected object ID (e.g. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates a copy of this DataPoint. |
double |
getAdjustedValue()
Returns a double value that is equal to the value encapsulated by the DataPoint. |
int |
getConnObjectId()
Returns the connected object ID of the DataPoint. |
java.lang.String |
getLabel()
Returns the label of the DataPoint. |
double |
getValue()
Returns the double value encapsulated by the DataPoint. |
double |
getVersion()
Returns the version of the class. |
int |
read(java.util.List strings,
int currentLineNumber)
|
protected void |
readRestOfFields(java.util.StringTokenizer st)
|
void |
setConnObjectId(int connObjectId)
Sets the connected object ID of the DataPoint to the ID specified. |
void |
setLabel(java.lang.String label)
Sets the label of the DataPoint to the label specified. |
void |
setValue(double value)
Sets the value of the DataPoint to the value specified. |
void |
setVersion(double version)
Sets the version number of the class. |
java.lang.String |
toHTMLString(boolean includeHTMLTag,
java.lang.String formatterMask)
This method will render the data set to an HTML string. |
java.lang.String |
toString()
Returns a string representation of the DataPoint in the format: [LABEL] = [VALUE] |
java.lang.String |
toString(java.lang.String formatterMask)
This method will render the data set to a string. |
java.util.List |
write()
Writes the object in question to a List of Strings. |
protected void |
writeRestOfFields(java.lang.StringBuffer sb)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static double version
protected java.lang.String label
protected double value
protected int connObjectId
Constructor Detail |
---|
public DataPoint()
public DataPoint(java.lang.String label, double value, int connObjectId)
label
- the String label of the DataPointvalue
- the double value of the DataPointconnObjectId
- the ID of the object to which the DataPoint appliespublic DataPoint(java.lang.String label)
public DataPoint(double value)
Method Detail |
---|
public double getVersion()
Writable
getVersion
in interface Writable
public void setVersion(double version)
Writable
setVersion
in interface Writable
version
- the version numberpublic double getValue()
public double getAdjustedValue()
public void setValue(double value)
value
- the new value for the DataPointpublic int getConnObjectId()
public void setConnObjectId(int connObjectId)
connObjectId
- the new connected object ID for the DataPointpublic java.lang.String getLabel()
public void setLabel(java.lang.String label)
label
- the new label for the DataPointpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.util.List write() throws MinervaReadWriteException
Writable
write
in interface Writable
MinervaReadWriteException
- if therepublic int read(java.util.List strings, int currentLineNumber) throws MinervaReadWriteException
read
in interface Writable
MinervaReadWriteException
protected void readRestOfFields(java.util.StringTokenizer st)
protected void writeRestOfFields(java.lang.StringBuffer sb)
public java.lang.String toHTMLString(boolean includeHTMLTag, java.lang.String formatterMask)
includeHTMLTag
- determines whether the string should be begun and ended with formatterMask
- if not "" then this method will apply the specified formatter mask to the value when turning it into a string
public java.lang.String toString(java.lang.String formatterMask)
formatterMask
- if not "" then this method will apply the specified formatter mask to the value when turning it into a string
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |