public class DecimalField extends CompactIntField
DecimalField
represents a decimal field with compact serialized form.
See Decimal
for description of internal representation.
It can be used for fields which are usually represented with
floating point values, such as prices, amounts, etc.Constructor and Description |
---|
DecimalField(int index,
String name) |
DecimalField(int index,
String name,
SerialFieldType serialType) |
Modifier and Type | Method and Description |
---|---|
int |
parseString(String value)
Parses string representation of specified field value.
|
double |
toDouble(int value)
Converts raw QD int-value to meaningful double value, or to
Double.NaN if inapplicable. |
int |
toInt(double value)
Converts meaningful double value to raw QD int-value, or to
0 if inapplicable. |
String |
toString(int value)
Returns string representation of specified field value.
|
readInt, readInt, writeInt, writeInt
equals, getString, read, setString, write
getDefaultPropertyName, getIndex, getLocalName, getName, getPropertyName, getRecord, getSerialType, setRecord, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIndex, getLocalName, getName, getPropertyName, getRecord, getSerialType
public DecimalField(int index, String name)
public DecimalField(int index, String name, SerialFieldType serialType)
public String toString(int value)
AbstractDataIntField
Integer.toString(value)
.toString
in interface DataIntField
toString
in class AbstractDataIntField
public int parseString(String value)
AbstractDataIntField
Integer.parseInt(value)
.parseString
in interface DataIntField
parseString
in class AbstractDataIntField
public double toDouble(int value)
AbstractDataIntField
Double.NaN
if inapplicable.toDouble
in interface DataIntField
toDouble
in class AbstractDataIntField
public int toInt(double value)
AbstractDataIntField
0
if inapplicable.toInt
in interface DataIntField
toInt
in class AbstractDataIntField
Copyright © 2002–2025 Devexperts LLC. All rights reserved.