com.devexperts.qd.kit
Class ShortStringField

java.lang.Object
  extended by com.devexperts.qd.kit.AbstractDataField
      extended by com.devexperts.qd.kit.AbstractDataIntField
          extended by com.devexperts.qd.kit.CompactIntField
              extended by com.devexperts.qd.kit.ShortStringField
All Implemented Interfaces:
DataField, DataIntField

public class ShortStringField
extends CompactIntField

The ShortStringField represents a short (up to 4 characters) string in a single integer with compact serialized form.

It can be used to represent short fixed-size character codes, such as MMID, etc.


Constructor Summary
ShortStringField(int index, java.lang.String name)
           
ShortStringField(int index, java.lang.String name, SerialFieldType serialType)
           
 
Method Summary
 int parseString(java.lang.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.
 java.lang.String toString(int value)
          Returns string representation of specified field value.
 
Methods inherited from class com.devexperts.qd.kit.CompactIntField
readInt, readInt, writeInt, writeInt
 
Methods inherited from class com.devexperts.qd.kit.AbstractDataIntField
equals, toInt
 
Methods inherited from class com.devexperts.qd.kit.AbstractDataField
getIndex, getLocalName, getName, getRecord, getSerialType, setRecord, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.devexperts.qd.DataField
getIndex, getLocalName, getName, getRecord, getSerialType
 

Constructor Detail

ShortStringField

public ShortStringField(int index,
                        java.lang.String name)

ShortStringField

public ShortStringField(int index,
                        java.lang.String name,
                        SerialFieldType serialType)
Method Detail

toString

public java.lang.String toString(int value)
Description copied from class: AbstractDataIntField
Returns string representation of specified field value. This method is used for debugging purposes. This implementation returns Integer.toString(value).

Specified by:
toString in interface DataIntField
Overrides:
toString in class AbstractDataIntField

parseString

public int parseString(java.lang.String value)
Description copied from class: AbstractDataIntField
Parses string representation of specified field value. This method is used for debugging purposes. This implementation returns Integer.parseInt(value).

Specified by:
parseString in interface DataIntField
Overrides:
parseString in class AbstractDataIntField

toDouble

public double toDouble(int value)
Description copied from class: AbstractDataIntField
Converts raw QD int-value to meaningful double value, or to Double.NaN if inapplicable.

Specified by:
toDouble in interface DataIntField
Overrides:
toDouble in class AbstractDataIntField