Top Description Methods
com.thoughtworks.xstream.converters

public Interface SingleValueConverter

extends ConverterMatcher
Known Direct Implementers
com.thoughtworks.xstream.converters.SingleValueConverterWrapper, com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter, com.thoughtworks.xstream.converters.basic.CharConverter, com.thoughtworks.xstream.converters.extended.EncodedByteArrayConverter, com.thoughtworks.xstream.converters.extended.PropertyEditorCapableConverter, com.thoughtworks.xstream.converters.time.ChronologyConverter, com.thoughtworks.xstream.converters.time.LocalDateTimeConverter, com.thoughtworks.xstream.converters.time.LocalTimeConverter, com.thoughtworks.xstream.converters.time.OffsetDateTimeConverter, com.thoughtworks.xstream.converters.time.OffsetTimeConverter, com.thoughtworks.xstream.converters.time.ZonedDateTimeConverter, com.thoughtworks.xstream.converters.time.ZoneIdConverter

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

com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter provides a starting point for objects that can store all information in a single value String.

Authors
Joe Walnes, Jörg Schaible, Mauro Talevi
Since
1.2
See Also
com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the Object
fromString
(String
the String with the single value of the Object
str
)

Unmarshals an Object from its single value representation.

public String

Returns:

a String with the single value of the Object or null
toString
(Object
the Object to be converted
obj
)

Marshals an Object into a single value representation.

Inherited from com.thoughtworks.xstream.converters.ConverterMatcher:
canConvert

Method Detail

fromStringback to summary
public Object fromString(String str)

Unmarshals an Object from its single value representation.

Parameters
str:String

the String with the single value of the Object

Returns:Object

the Object

toStringback to summary
public String toString(Object obj)

Marshals an Object into a single value representation.

Parameters
obj:Object

the Object to be converted

Returns:String

a String with the single value of the Object or null