com.huguesjohnson.jail.jdt
Class DataInstance
java.lang.Object
|
+--com.huguesjohnson.jail.jdt.DataInstance
- All Implemented Interfaces:
- java.io.Serializable
- public class DataInstance
- extends java.lang.Object
- implements java.io.Serializable
class JdtDataInstance, internal representation for stored data
- See Also:
- Serialized Form
Constructor Summary |
DataInstance(int elementCount)
constructor |
Method Summary |
java.lang.String |
getClassification()
retreives class for the data |
double |
getData(int index)
retrieves an element of data |
void |
setClassification(java.lang.String classification)
sets the class for the data |
void |
setData(int index,
double value)
sets an element in the data instance |
java.lang.String |
toString()
toString returns a string representation of the object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DataInstance
public DataInstance(int elementCount)
- constructor
- Parameters:
elementCount
- how many elements are to be stored
setData
public void setData(int index,
double value)
- sets an element in the data instance
- Parameters:
index
- index of data elementvalue
- value of data
getData
public double getData(int index)
- retrieves an element of data
- Parameters:
index
- index of data element- Returns:
- element of data at index, 0 if invalid index
setClassification
public void setClassification(java.lang.String classification)
- sets the class for the data
- Parameters:
classification
- new classification
getClassification
public java.lang.String getClassification()
- retreives class for the data
- Returns:
- classification for data
toString
public java.lang.String toString()
- toString returns a string representation of the object
- Overrides:
toString
in class java.lang.Object
- Returns:
- string representation of the object