org.apache.commons.convert
Class BooleanConverters.BooleanToInteger

java.lang.Object
  extended by org.apache.commons.convert.AbstractConverter<Boolean,Integer>
      extended by 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.


Constructor Summary
BooleanConverters.BooleanToInteger()
           
 
Method Summary
 Integer convert(Boolean obj)
          Returns 1 if obj is true, or zero if obj is false.
 
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.BooleanToInteger

public BooleanConverters.BooleanToInteger()
Method Detail

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.