com.thoughtworks.xstream.converters
Interface SingleValueConverter

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

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)
          Unmarshals an Object from its single value representation.
 java.lang.String toString(java.lang.Object obj)
          Marshals 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)
Marshals 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)
Unmarshals 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/