Java EE 5 SDK

com.sun.appserv.management.util.misc
Class StringValuePersister

java.lang.Object
  extended by com.sun.appserv.management.util.misc.StringValuePersister
All Implemented Interfaces:
ValuePersister

public final class StringValuePersister
extends Object
implements ValuePersister

Implementation of ValuePersister for String. Not useful in its own right, but can be useful in a context where everything requires a ValuePersister.


Field Summary
static StringValuePersister DEFAULT
           
 
Constructor Summary
StringValuePersister()
           
 
Method Summary
 Object asObject(String value)
          Returns the original object
 String asString(Object value)
          Returns value.toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final StringValuePersister DEFAULT
Constructor Detail

StringValuePersister

public StringValuePersister()
Method Detail

asString

public String asString(Object value)
Returns value.toString()

Specified by:
asString in interface ValuePersister
Parameters:
value - must be a String
Returns:
a String representation of the Object

asObject

public Object asObject(String value)
Returns the original object

Specified by:
asObject in interface ValuePersister
Parameters:
value -
Returns:
the corresponding Object representation

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.