gov.sandia.cognition.data.convert.number
Class StringToIntegerConverter

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.data.convert.AbstractDataConverter<InputType,OutputType>
          extended by gov.sandia.cognition.data.convert.AbstractReversibleDataConverter<InputType,OutputType>
              extended by gov.sandia.cognition.data.convert.AbstractReverseCachedDataConverter<String,Integer,ObjectToStringConverter>
                  extended by gov.sandia.cognition.data.convert.number.StringToIntegerConverter
All Implemented Interfaces:
DataConverter<String,Integer>, ReversibleDataConverter<String,Integer>, Evaluator<String,Integer>, ReversibleEvaluator<String,Integer,DataConverter<? super Integer,? extends String>>, CloneableSerializable, Serializable, Cloneable

public class StringToIntegerConverter
extends AbstractReverseCachedDataConverter<String,Integer,ObjectToStringConverter>

Converts a String to a Integer using the Integer.valueOf method.

Since:
3.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.data.convert.AbstractReverseCachedDataConverter
reverse
 
Constructor Summary
StringToIntegerConverter()
          Creates a new StringToIntegerConverter.
 
Method Summary
protected  ObjectToStringConverter createReverse()
          Creates a new reverse converter.
 Integer evaluate(String input)
          Converts the given String to a Integer.
 
Methods inherited from class gov.sandia.cognition.data.convert.AbstractReverseCachedDataConverter
reverse
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringToIntegerConverter

public StringToIntegerConverter()
Creates a new StringToIntegerConverter.

Method Detail

evaluate

public Integer evaluate(String input)
Converts the given String to a Integer.

Parameters:
input - The String to convert.
Returns:
The integer value of the String.

createReverse

protected ObjectToStringConverter createReverse()
Description copied from class: AbstractReverseCachedDataConverter
Creates a new reverse converter. Should only be called when there is a cache miss for this converter.

Specified by:
createReverse in class AbstractReverseCachedDataConverter<String,Integer,ObjectToStringConverter>
Returns:
The reverse converter.