org.apache.commons.convert
Class BooleanConverters.StringToBoolean
java.lang.Object
org.apache.commons.convert.AbstractConverter<String,Boolean>
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
.
Method Summary |
Boolean |
convert(String obj)
Returns true if obj equals "true", or
false if obj is any other value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanConverters.StringToBoolean
public BooleanConverters.StringToBoolean()
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.