com.thoughtworks.xstream.converters
Interface SingleValueConverter

All Superinterfaces:
ConverterMatcher
All Known Implementing Classes:
AbstractSingleValueConverter, BigDecimalConverter, BigIntegerConverter, BooleanConverter, ByteConverter, CharsetConverter, CurrencyConverter, DateConverter, DoubleConverter, FileConverter, FloatConverter, IntConverter, ISO8601DateConverter, ISO8601GregorianCalendarConverter, ISO8601SqlTimestampConverter, JavaClassConverter, LocaleConverter, LongConverter, ShortConverter, SingleValueConverterWrapper, SqlDateConverter, SqlTimeConverter, SqlTimestampConverter, StackTraceElementConverter, StringBufferConverter, StringConverter, TextAttributeConverter, ToStringConverter, URLConverter

public interface SingleValueConverter
extends ConverterMatcher

SingleValueConverter implementations are marshallable to/from a single value String representation.

AbstractSingleValueConverter provides a starting point for objects that can store all information in a single value String.

Since:
1.2
Author:
Joe Walnes, Jörg Schaible, Mauro Talevi
See Also:
Converter, AbstractSingleValueConverter

Method Summary
 java.lang.Object fromString(java.lang.String str)
          Unmarshalls an Object from its single value representation.
 java.lang.String toString(java.lang.Object obj)
          Marshalls an Object into a single value representation.
 
Methods inherited from interface com.thoughtworks.xstream.converters.ConverterMatcher
canConvert
 

Method Detail

toString

java.lang.String toString(java.lang.Object obj)
Marshalls an Object into a single value representation.

Parameters:
obj - the Object to be converted
Returns:
a String with the single value of the Object or null

fromString

java.lang.Object fromString(java.lang.String str)
Unmarshalls an Object from its single value representation.

Parameters:
str - the String with the single value of the Object
Returns:
the Object


Joe Walnes, http://xstream.codehaus.org/