com.ibm.di.connector.maximo.util.typeconverter
Class BooleanConverter

java.lang.Object
  extended by com.ibm.di.connector.maximo.util.typeconverter.BooleanConverter
All Implemented Interfaces:
IMxTypeConverter

public final class BooleanConverter
extends Object
implements IMxTypeConverter

Maximo Type Converter for Boolean types.

Since:
7.1
See Also:
Boolean

Method Summary
static BooleanConverter getInstance()
          Returns an instance of BooleanConverter.
 String toString(Object value)
          Returns a String object representing the specified value .
 Object valueOf(String value)
          Returns a Boolean object representing the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BooleanConverter getInstance()
Returns an instance of BooleanConverter.

Returns:
instance of BooleanConverter

toString

public String toString(Object value)
                throws MxConnTypeConvertionException
Returns a String object representing the specified value .
Value Returns
Boolean.TRUE, "1", "true" "TRUE" "1"
Boolean.FALSE, "0", "false" "FALSE" "0"
null, empty string, white spaces empty string

Specified by:
toString in interface IMxTypeConverter
Parameters:
value - value to be converted
Returns:
String object representing the specified value
Throws:
MxConnTypeConvertionException - if the specified value can not be converted

valueOf

public Object valueOf(String value)
               throws MxConnTypeConvertionException
Returns a Boolean object representing the specified value.
Value Returns
"1", "true" "TRUE" Boolean.TRUE
"0", "false" "FALSE" Boolean.FALSE
null, empty string, white spaces null

Specified by:
valueOf in interface IMxTypeConverter
Parameters:
value - value to be converted
Returns:
Boolean object representing the specified value
Throws:
MxConnTypeConvertionException - if the specified value can not be converted