|
|||||||||||
| 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
VoidValue represents an undefined value. In particular, when compared
against other defined values with min(com.davisor.data.DataValue) and max(com.davisor.data.DataValue) values,
the other value is always returned.
Type,
VoidType,
Serialized Form| Field Summary |
| Fields inherited from class com.davisor.data.VoidData |
M_type |
| Constructor Summary | |
|
VoidValue()
Default constructor. |
protected |
VoidValue(Type type)
Create a new data object. |
|
VoidValue(VoidValue data,
boolean deep)
Deep or shallow copy constructor. |
| Method Summary | |
DataValue |
abs()
Returns absolute data value of current value. |
DataValue |
add(DataValue value)
Adds data values. |
DataValue |
ceil(DataValue precision)
Quantizes the current value up to an even value within given precision. |
int |
compareTo(java.lang.Object o)
Compares this void value to other values. |
double |
deinterpolate(DataValue min,
DataValue max)
De-interpolates the current data value to a scalar value, in respect, with the given data value range. |
DataValue |
div(DataValue value)
Divides the current value with given value. |
com.davisor.core.Dupable |
dup()
Makes a deep copy of this object. |
DataValue |
floor(DataValue precision)
Quantizes the current value down to an even value within given precision. |
java.lang.String |
getFormat()
Gets the type specification optimal for this particular value. |
DataValue |
interpolate(double value,
DataValue max)
Interpolates the given scalar value to data value, in respect, with the range defined by this value and the given maximum value. |
boolean |
isNull()
Tests if this data object value is undetermined. |
DataValue |
max(DataValue value)
Finds the larger of two data values. |
DataValue |
min(DataValue value)
Finds the smaller of two data values. |
DataValue |
mul(DataValue value)
Multiplies the current value with given value. |
DataValue |
negate()
Returns the negation of current value. |
void |
setValue(java.lang.String stringValue,
java.text.ParsePosition status)
Sets data value from a string value. |
DataValue |
sub(DataValue value)
Subtracts a data value. |
void |
toStatement(java.sql.PreparedStatement statement,
int parameter)
Converts the data to a prepared statement input parameter. |
java.lang.String |
toXML()
Gets the XML string representation of this 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.VoidData |
equals, getDataValue, getType, hashCode, setType, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.davisor.data.DataValue |
toString |
| Methods inherited from interface com.davisor.data.Data |
getType |
| Constructor Detail |
public VoidValue()
public VoidValue(VoidValue data,
boolean deep)
data - source data (may be null)deep - determines if the copying is deep or shallowVoidData.getType(),
Type.dup()protected VoidValue(Type type)
type - The type of data.| Method Detail |
public int compareTo(java.lang.Object o)
null values and instances of
VoidValue class, and smaller than anything
else.
compareTo in interface java.lang.Comparablemax(com.davisor.data.DataValue),
min(com.davisor.data.DataValue),
Data.getType(),
Compare.compareTo(Object,Object)public boolean isNull()
isNull in interface SerializableDatatrueType.isNull(com.davisor.data.SerializableData)
public DataValue abs()
throws InvalidDataException
abs in interface DataValueInvalidDataException - if absolute value can not be computed
public DataValue add(DataValue value)
throws InvalidDataException
null, a duplicate of this object is
returned. This behaviour is expected to be overridden by most
subclasses.
add in interface DataValuevalue - a data value to be added to this data value
InvalidDataException - if the data values can not be added
public DataValue ceil(DataValue precision)
throws InvalidDataException
ceil in interface DataValueprecision - the precision within quantization occurs (ignored)
InvalidDataException - if precision was of unacceptable typefloor(com.davisor.data.DataValue)
public double deinterpolate(DataValue min,
DataValue max)
throws InvalidDataException
NaN
number value. This behaviour is expected to be overridden by most
subclasses.
deinterpolate in interface DataValuemin - a data value representing a range's lower limit (ignored)max - a data value representing a range's higher limit (ignored)
InvalidDataException - if the de-interpolation fails for some
other reasonDataValue.interpolate(double, com.davisor.data.DataValue),
DeinterpolationException,
TupleData.deinterpolate(com.davisor.data.DataValue, com.davisor.data.DataValue)
public DataValue div(DataValue value)
throws InvalidDataException
div in interface DataValuevalue - the divider
InvalidDataException - if current divider is null or zero value.
public DataValue floor(DataValue precision)
throws InvalidDataException
floor in interface DataValueprecision - the precision within quantization occurs
InvalidDataException - if precision was of unacceptable typeceil(com.davisor.data.DataValue)public java.lang.String getFormat()
The void data optimal specificaton string is always the current specification string for the current type.
getFormat in interface DataValueData.getType(),
FormatType.getFormat(),
FormatType.setFormat(java.util.Locale, java.lang.String)
public DataValue interpolate(double value,
DataValue max)
throws InvalidDataException
interpolate in interface DataValuevalue - the scalar value to be interpolatedmax - a data value representing a range's higher limit
InvalidDataException - if the interpolation failsDataValue.deinterpolate(com.davisor.data.DataValue, com.davisor.data.DataValue)
public DataValue max(DataValue value)
throws InvalidDataException
value is null, a reference to
this instance is returned, otherwise value
is returned.
Please note, that this behaviour is not typical, as the same void
value may be both smaller and greater than an other value, depending
which of the min or max methods is called.
max in interface DataValuevalue - a data value to be compared with this data value
InvalidDataException - if the data value cannot be comparedmin(com.davisor.data.DataValue)
public DataValue min(DataValue value)
throws InvalidDataException
value is null, a reference to
this instance is returned, otherwise value
is returned.
Please note, that this behaviour is not typical, as the same void
value may be both smaller and greater than an other value, depending
which of the min or max methods is called.
min in interface DataValuevalue - a data value to be compared with this data value
InvalidDataException - if the data value cannot be comparedmax(com.davisor.data.DataValue)
public DataValue mul(DataValue value)
throws InvalidDataException
mul in interface DataValuevalue - the multiplier
InvalidDataException - if current multiplier is null.
public DataValue negate()
throws InvalidDataException
negate in interface DataValueInvalidDataException - if absolute value can not be computed
public void setValue(java.lang.String stringValue,
java.text.ParsePosition status)
throws InvalidDataException
Void values have no value, so given string value is just ignored.
setValue in interface DataValuestringValue - string value to be parsed (ignored)status - parse status (ignored)
InvalidDataException - if string value could not be parserCountType.countValue(String,ParsePosition)
public DataValue sub(DataValue value)
throws InvalidDataException
sub in interface DataValuevalue - a data value to be subtracted from this data value
InvalidDataException - if the value cannot be
substracted.
public void toStatement(java.sql.PreparedStatement statement,
int parameter)
throws java.sql.SQLException
null.
toStatement in interface DataValuestatement - statement to be updatedparameter - index of the statement parameter to be updated
java.sql.SQLException - if a SQL error occurs.public java.lang.String toXML()
This default implementation returns always <null/>
tag.
toXML in interface DataValueVoidData.toString(),
XMLUnicodeEncoder.encode(java.lang.String, boolean)
public DataValue unit(DataValue targetValue,
double maxSteps)
throws InvalidDataException
unit in interface DataValuetargetValue - target value to be reached (ignored)maxSteps - maximum number of steps (zero leaves the choise open)
InvalidDataException - if target value is unsuitablepublic com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||