com.teraspaces.qwframework
Class FIXTypeConverter

java.lang.Object
  extended by com.teraspaces.qwframework.FIXTypeConverter

public class FIXTypeConverter
extends Object

Helper functions used by QWFIX internally.


Constructor Summary
FIXTypeConverter()
           
 
Method Summary
static String dateToString(DateTime value)
          Converts a date to string.
static String floatToString(double value)
          Converts a float number to string.
static DateTime parseDate(String value, DateTimeKind kind)
          Parses the date from a string.
static TimeSpan parseTime(String value)
          Parses the time from a string.
static DateTime parseTimestamp(String value, DateTimeKind kind)
          Parses the time stamp from a string.
static String timestampToString(DateTime value, boolean hasMilli)
          Converts a time stamp to string.
static String timeToString(TimeSpan value, boolean hasMilli)
          Converts a time value to string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIXTypeConverter

public FIXTypeConverter()
Method Detail

floatToString

public static String floatToString(double value)
Converts a float number to string.

Parameters:
value - the value
Returns:
the result

timestampToString

public static String timestampToString(DateTime value,
                                       boolean hasMilli)
Converts a time stamp to string.

Parameters:
value - the value
hasMilli - a value indicating whether millisecond value is included
Returns:
the result

dateToString

public static String dateToString(DateTime value)
Converts a date to string.

Parameters:
value - the value
Returns:
the result

timeToString

public static String timeToString(TimeSpan value,
                                  boolean hasMilli)
Converts a time value to string.

Parameters:
value - the value
hasMilli - a value indicating whether millisecond value is included
Returns:
the result

parseTimestamp

public static DateTime parseTimestamp(String value,
                                      DateTimeKind kind)
Parses the time stamp from a string.

Parameters:
value - the value
kind - the kind
Returns:
the result

parseDate

public static DateTime parseDate(String value,
                                 DateTimeKind kind)
Parses the date from a string.

Parameters:
value - the value
kind - the kind
Returns:
the result

parseTime

public static TimeSpan parseTime(String value)
Parses the time from a string.

Parameters:
value - the value
Returns:
the result