org.apache.commons.convert
Class BooleanConverters.StringToBoolean

java.lang.Object
  extended by org.apache.commons.convert.AbstractConverter<String,Boolean>
      extended by org.apache.commons.convert.BooleanConverters.StringToBoolean
All Implemented Interfaces:
Converter<String,Boolean>, ConverterLoader
Enclosing class:
BooleanConverters

public static class BooleanConverters.StringToBoolean
extends AbstractConverter<String,Boolean>

An object that converts a String to a Boolean.


Constructor Summary
BooleanConverters.StringToBoolean()
           
 
Method Summary
 Boolean convert(String obj)
          Returns true if obj equals "true", or false if obj is any other value.
 
Methods inherited from class org.apache.commons.convert.AbstractConverter
canConvert, getSourceClass, getTargetClass, loadConverters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanConverters.StringToBoolean

public BooleanConverters.StringToBoolean()
Method Detail

convert

public Boolean convert(String obj)
                throws ConversionException
Returns true if obj equals "true", or false if obj is any other value. The test for "true" is case-insensitive.

Parameters:
obj - The source Object to convert
Returns:
The converted Object
Throws:
ConversionException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.