quickfix.field.converter
Class BooleanConverter

java.lang.Object
  extended by quickfix.field.converter.BooleanConverter

public class BooleanConverter
extends java.lang.Object

Converts between a boolean and a string.


Constructor Summary
BooleanConverter()
           
 
Method Summary
static java.lang.String convert(boolean b)
          Converts a boolean to a String.
static boolean convert(java.lang.String value)
          Converts a String value to a boolean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanConverter

public BooleanConverter()
Method Detail

convert

public static java.lang.String convert(boolean b)
Converts a boolean to a String.

Parameters:
b - the boolean value
Returns:
"Y" for true and "N" for false.

convert

public static boolean convert(java.lang.String value)
                       throws FieldConvertError
Converts a String value to a boolean.

Parameters:
value - the String value to convert
Returns:
true if "Y" and false if "N"
Throws:
FieldConvertError - raised for any value other than "Y" or "N".