org.apache.commons.convert
Class NumberConverters.StringToInteger

java.lang.Object
  extended by org.apache.commons.convert.AbstractConverter<S,T>
      extended by org.apache.commons.convert.AbstractLocalizedConverter<String,N>
          extended by org.apache.commons.convert.NumberConverters.AbstractStringToNumberConverter<Integer>
              extended by org.apache.commons.convert.NumberConverters.StringToInteger
All Implemented Interfaces:
Converter<String,Integer>, ConverterLoader, LocalizedConverter<String,Integer>
Enclosing class:
NumberConverters

public static class NumberConverters.StringToInteger
extends NumberConverters.AbstractStringToNumberConverter<Integer>

An object that converts a String to an Integer.


Constructor Summary
NumberConverters.StringToInteger()
           
 
Method Summary
protected  Integer convert(Number number)
           
 Integer convert(String obj)
          Converts obj to T.
 
Methods inherited from class org.apache.commons.convert.NumberConverters.AbstractStringToNumberConverter
convert
 
Methods inherited from class org.apache.commons.convert.AbstractLocalizedConverter
convert
 
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
 
Methods inherited from interface org.apache.commons.convert.Converter
canConvert, getSourceClass, getTargetClass
 

Constructor Detail

NumberConverters.StringToInteger

public NumberConverters.StringToInteger()
Method Detail

convert

protected Integer convert(Number number)
                   throws ConversionException
Specified by:
convert in class NumberConverters.AbstractStringToNumberConverter<Integer>
Throws:
ConversionException

convert

public Integer convert(String obj)
                throws ConversionException
Description copied from interface: Converter
Converts obj to T.

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


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