com.devexperts.qd
Interface DataIntField

All Superinterfaces:
DataField
All Known Implementing Classes:
CompactCharField, CompactIntField, DecimalField, PlainIntField, ShortStringField, VoidIntField

public interface DataIntField
extends DataField

The DataIntField defines identity and access API for Int-fields.


Method Summary
 boolean equals(int value1, int value2)
          Compares two specified field values for equality.
 int parseString(java.lang.String value)
          Parses string representation of specified field value.
 int readInt(java.io.DataInput in)
          Reads field value from specified data intput and returns it to the caller.
 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.
 java.lang.String toString(int value)
          Returns string representation of specified field value.
 void writeInt(java.io.DataOutput out, int value)
          Writes specified field value into specified data output.
 
Methods inherited from interface com.devexperts.qd.DataField
getIndex, getLocalName, getName, getRecord, getSerialType
 

Method Detail

toString

java.lang.String toString(int value)
Returns string representation of specified field value. This method is used for debugging purposes.


parseString

int parseString(java.lang.String value)
Parses string representation of specified field value. This method is used for debugging purposes.

Throws:
java.lang.IllegalArgumentException - if string cannot be parsed.

toDouble

double toDouble(int value)
Converts raw QD int-value to meaningful double value, or to Double.NaN if inapplicable.


toInt

int toInt(double value)
Converts meaningful double value to raw QD int-value, or to 0 if inapplicable.


equals

boolean equals(int value1,
               int value2)
Compares two specified field values for equality. This method is used for implementation of ticker contract.


writeInt

void writeInt(java.io.DataOutput out,
              int value)
              throws java.io.IOException
Writes specified field value into specified data output.

Throws:
java.io.IOException - as specified data output does.

readInt

int readInt(java.io.DataInput in)
            throws java.io.IOException
Reads field value from specified data intput and returns it to the caller.

Throws:
java.io.IOException - as specified data input does.