|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.data.VoidData
com.davisor.data.VoidValue
com.davisor.data.GenericValue
com.davisor.data.TextData
The TextData object represents plain text data.
TextType,
Serialized Form| Field Summary | |
static TextData |
EMPTY
Constant empty ("") text data value. |
| Fields inherited from class com.davisor.data.VoidData |
M_type |
| Constructor Summary | |
TextData()
Creates a new text data object with the default text type and value null. |
|
TextData(java.lang.String value)
Creates a new text data object with the default text type and given value. |
|
TextData(TextData data,
boolean deep)
Deep or shallow copy constructor. |
|
TextData(TextType type,
java.lang.String value)
Creates a new text data object with the given text type and value. |
|
TextData(TextType type,
java.lang.String value,
java.text.ParsePosition status)
Creates a new text data object with the given text type and value. |
|
TextData(Type type)
Creates a new text data object with the given text type and value null. |
|
| Method Summary | |
DataValue |
add(DataValue value)
Adds data values. |
int |
compareTo(java.lang.Object o)
Compares this data object with other objects. |
com.davisor.core.Dupable |
dup()
Makes a deep copy of this object. |
boolean |
equals(java.lang.Object o)
Tests if this object is equal with another object. |
java.lang.String |
getValue()
Gets the text value. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isNull()
Tests if this data object value is undetermined. |
void |
setValue(java.lang.String stringValue,
java.text.ParsePosition status)
Sets data value from a string value. |
DataValue |
sub(DataValue value)
Substracts a data value. |
void |
toStatement(java.sql.PreparedStatement statement,
int parameter)
Converts the data to a prepared statement input parameter. |
java.lang.String |
toString()
Gets the string representation of this text value. |
DataValue |
unit(DataValue targetValue,
double maxSteps)
Gets the largest suitable unit step to represent a value change between this value and the given target value. |
| Methods inherited from class com.davisor.data.GenericValue |
max, min, toXML |
| Methods inherited from class com.davisor.data.VoidValue |
abs, ceil, deinterpolate, div, floor, getFormat, interpolate, mul, negate |
| Methods inherited from class com.davisor.data.VoidData |
getDataValue, getType, setType |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.davisor.data.Data |
getType |
| Field Detail |
public static final TextData EMPTY
| Constructor Detail |
public TextData()
public TextData(TextData data,
boolean deep)
data - source data (may be null)deep - determines if the copying is deep or shallowVoidData.getType(),
Type.dup()public TextData(java.lang.String value)
public TextData(Type type)
type - the type of data
public TextData(TextType type,
java.lang.String value)
throws InvalidDataException
type - the type of datavalue - string value (may be null)
InvalidDataException - if the value was invalidTextData(TextType,String,ParsePosition)
public TextData(TextType type,
java.lang.String value,
java.text.ParsePosition status)
throws InvalidDataException
type - the type of datavalue - string value (may be null)status - parse status (may be null)
InvalidDataException - if the value was invalidsetValue(String,ParsePosition)| Method Detail |
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class GenericValueo - object to compare this object with
java.lang.ClassCastException - if the given object is not a TextData objectGenericValue.max(com.davisor.data.DataValue),
GenericValue.min(com.davisor.data.DataValue),
Compare.compareTo(Object,Object)
public DataValue unit(DataValue targetValue,
double maxSteps)
throws InvalidDataException
Text data does not support the concept of unit values. Calling this method raises a runtime error.
unit in interface DataValueunit in class VoidValuetargetValue - target value to be reached (may be null)maxSteps - maximum number of steps (zero leaves the choise open)
InvalidDataException - if target value is unsuitablepublic boolean isNull()
isNull in interface SerializableDataisNull in class VoidValuetrue
public DataValue add(DataValue value)
throws InvalidDataException
add in interface DataValueadd in class VoidValuevalue - a data value to be added to this data value
InvalidDataException - if the data values cannot be added.
public void setValue(java.lang.String stringValue,
java.text.ParsePosition status)
throws InvalidDataException
setValue in interface DataValuesetValue in class VoidValuestringValue - string value to be parsed (may be null)status - parse status (may be null)
InvalidDataException - if string value could not be parserTextType.stringValue(String,ParsePosition)
public DataValue sub(DataValue value)
throws InvalidDataException
sub in interface DataValuesub in class VoidValuevalue - a data value to be substracted from this data value
InvalidDataException - if value can not be
substracted.public java.lang.String toString()
toString in interface DataValuetoString in class VoidDataGenericValue.toXML()
public void toStatement(java.sql.PreparedStatement statement,
int parameter)
throws java.sql.SQLException
toStatement in interface DataValuetoStatement in class GenericValuestatement - statement to be updatedparameter - index of the statement parameter to be updated
java.sql.SQLException - if a SQL error occurs.VoidData.toString()public com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupabledup in class VoidValuepublic boolean equals(java.lang.Object o)
Text data objects are equal if their super-classes and values are.
equals in class VoidDataCompare.equals(Object,Object)public int hashCode()
hashCode in class VoidDatapublic java.lang.String getValue()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||