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, writeIntequals, getString, read, setString, writegetDefaultPropertyName, getIndex, getLocalName, getName, getPropertyName, getRecord, getSerialType, setRecord, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIndex, getLocalName, getName, getPropertyName, getRecord, getSerialTypepublic DecimalField(int index,
String name)
public DecimalField(int index,
String name,
SerialFieldType serialType)
public String toString(int value)
AbstractDataIntFieldInteger.toString(value).toString in interface DataIntFieldtoString in class AbstractDataIntFieldpublic int parseString(String value)
AbstractDataIntFieldInteger.parseInt(value).parseString in interface DataIntFieldparseString in class AbstractDataIntFieldpublic double toDouble(int value)
AbstractDataIntFieldDouble.NaN if inapplicable.toDouble in interface DataIntFieldtoDouble in class AbstractDataIntFieldpublic int toInt(double value)
AbstractDataIntField0 if inapplicable.toInt in interface DataIntFieldtoInt in class AbstractDataIntFieldCopyright © 2002–2025 Devexperts LLC. All rights reserved.