net.sf.jsefa.common.converter
Class StringConverter

java.lang.Object
  extended by net.sf.jsefa.common.converter.StringConverter
All Implemented Interfaces:
SimpleTypeConverter

public final class StringConverter
extends Object
implements SimpleTypeConverter

Converter for String objects.

It is thread-safe.

Author:
Norman Lahme-Huetig

Method Summary
static StringConverter create()
          Returns the single StringConverter.
 Object fromString(String value)
          Converts the given String object into an object with the simple data type this converter is intended for.
 String toString(Object value)
          Converts the given value to a String object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static StringConverter create()
Returns the single StringConverter.

Returns:
the single string converter.

fromString

public Object fromString(String value)
Converts the given String object into an object with the simple data type this converter is intended for.

Specified by:
fromString in interface SimpleTypeConverter
Parameters:
value - the String object to convert
Returns:
the converted value

toString

public String toString(Object value)
Converts the given value to a String object.

Specified by:
toString in interface SimpleTypeConverter
Parameters:
value - the value to convert
Returns:
the converted value


Copyright © 2014. All rights reserved.