com.taco.text
Class StringToIntegerConverter

java.lang.Object
  extended by com.taco.text.AbstractStringToObjectConverter
      extended by com.taco.text.StringToIntegerConverter
All Implemented Interfaces:
IStringToObjectConverter, IObjectMapper, java.io.Serializable

public final class StringToIntegerConverter
extends AbstractStringToObjectConverter
implements java.io.Serializable

A string to object converter that converts number strings into instances of Integer.

See Also:
Serialized Form

Field Summary
static StringToIntegerConverter instance
          The singleton instance of this class.
 
Method Summary
 java.lang.Object toObject(java.lang.String s)
          Convert the string using Integer.decode().
 
Methods inherited from class com.taco.text.AbstractStringToObjectConverter
map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final StringToIntegerConverter instance
The singleton instance of this class.

Method Detail

toObject

public java.lang.Object toObject(java.lang.String s)
                          throws java.text.ParseException
Convert the string using Integer.decode().

Specified by:
toObject in interface IStringToObjectConverter
Returns:
An instance of Integer wrapping the converted value.
Throws:
java.text.ParseException - if Integer.decode() throws a NumberFormatException.