net.sourceforge.jeuclid.context.typewrapper
Class StringTypeWrapper

java.lang.Object
  extended by net.sourceforge.jeuclid.context.typewrapper.AbstractSimpleTypeWrapper
      extended by net.sourceforge.jeuclid.context.typewrapper.StringTypeWrapper
All Implemented Interfaces:
Serializable, TypeWrapper

public final class StringTypeWrapper
extends AbstractSimpleTypeWrapper

Converting String to String is trivial...

Version:
$Revision: 03dc0884e86f $
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.sourceforge.jeuclid.context.typewrapper.TypeWrapper
FAILED_TO_CONVERT, TO
 
Method Summary
 Object fromString(String value)
          Attempts to convert a parameter value expressed as string into an instance of the appropriate (for this parameter) type.
static TypeWrapper getInstance()
           
 String toString(Object value)
          Attempts to convert a parameter value expressed as an object of the appropriate (for this parameter) type into a string representation.
 
Methods inherited from class net.sourceforge.jeuclid.context.typewrapper.AbstractSimpleTypeWrapper
getValueType, valid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TypeWrapper getInstance()
Returns:
the singleton instance.

fromString

public Object fromString(String value)
Attempts to convert a parameter value expressed as string into an instance of the appropriate (for this parameter) type.

Specified by:
fromString in interface TypeWrapper
Overrides:
fromString in class AbstractSimpleTypeWrapper
Parameters:
value - parameter value as string
Returns:
parameter value as an instance of the proper type

toString

public String toString(Object value)
Attempts to convert a parameter value expressed as an object of the appropriate (for this parameter) type into a string representation.

Specified by:
toString in interface TypeWrapper
Overrides:
toString in class AbstractSimpleTypeWrapper
Parameters:
value - parameter value as object
Returns:
parameter value as string


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.