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, EncodedByteArrayConverter, EnumSingleValueConverter, FileConverter, FloatConverter, IntConverter, ISO8601DateConverter, ISO8601GregorianCalendarConverter, ISO8601SqlTimestampConverter, JavaClassConverter, LocaleConverter, LongConverter, PropertyEditorCapableConverter, ShortConverter, SingleValueConverterWrapper, SqlDateConverter, SqlTimeConverter, SqlTimestampConverter, StackTraceElementConverter, StringBufferConverter, StringBuilderConverter, StringConverter, TextAttributeConverter, ToStringConverter, URIConverter, 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
 Object fromString(String str)
          Unmarshals an Object from its single value representation.
 String toString(Object obj)
          Marshals an Object into a single value representation.
 
Methods inherited from interface com.thoughtworks.xstream.converters.ConverterMatcher
canConvert
 

Method Detail

toString

String toString(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

Object fromString(String str)
Unmarshals an Object from its single value representation.

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


Copyright © 2004-2014 XStream. All Rights Reserved.