org.apache.commons.convert
Class BooleanConverters.BooleanToInteger
java.lang.Object
org.apache.commons.convert.AbstractConverter<Boolean,Integer>
org.apache.commons.convert.BooleanConverters.BooleanToInteger
- All Implemented Interfaces:
- Converter<Boolean,Integer>, ConverterLoader
- Enclosing class:
- BooleanConverters
public static class BooleanConverters.BooleanToInteger
- extends AbstractConverter<Boolean,Integer>
An object that converts a Boolean
to an Integer
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanConverters.BooleanToInteger
public BooleanConverters.BooleanToInteger()
convert
public Integer convert(Boolean obj)
throws ConversionException
- Returns 1 if
obj
is true, or zero if
obj
is false.
- Parameters:
obj
- The source Object
to convert
- Returns:
- The converted
Object
- Throws:
ConversionException
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.