Interface SingleValueConverter
-
- All Superinterfaces:
ConverterMatcher
- All Known Implementing Classes:
AbstractAttributedCharacterIteratorAttributeConverter,AbstractChronoLocalDateConverter,AbstractSingleValueConverter,AtomicBooleanConverter,AtomicIntegerConverter,AtomicLongConverter,BigDecimalConverter,BigIntegerConverter,BooleanConverter,ByteConverter,CharConverter,CharsetConverter,ChronologyConverter,CurrencyConverter,DateConverter,DoubleConverter,DurationConverter,DurationConverter,EncodedByteArrayConverter,EnumSingleValueConverter,EnumToStringConverter,FileConverter,FloatConverter,HijrahDateConverter,InstantConverter,IntConverter,ISO8601DateConverter,ISO8601GregorianCalendarConverter,ISO8601JavaTimeConverter,ISO8601JodaTimeConverter,ISO8601SqlTimestampConverter,JapaneseDateConverter,JapaneseEraConverter,JavaClassConverter,LocalDateConverter,LocalDateTimeConverter,LocaleConverter,LocalTimeConverter,LongConverter,MinguoDateConverter,MonthDayConverter,OffsetDateTimeConverter,OffsetTimeConverter,OptionalDoubleConverter,OptionalIntConverter,OptionalLongConverter,PathConverter,PeriodConverter,PropertyEditorCapableConverter,ShortConverter,SingleValueConverterWrapper,SqlDateConverter,SqlTimeConverter,SqlTimestampConverter,StackTraceElementConverter,StringBufferConverter,StringBuilderConverter,StringConverter,TextAttributeConverter,ThaiBuddhistDateConverter,ToStringConverter,URIConverter,URLConverter,UUIDConverter,YearConverter,YearMonthConverter,ZonedDateTimeConverter,ZoneIdConverter
public interface SingleValueConverter extends ConverterMatcher
SingleValueConverter implementations are marshallable to/from a single value String representation.AbstractSingleValueConverterprovides a starting point for objects that can store all information in a single value String.- Since:
- 1.2
- See Also:
Converter,AbstractSingleValueConverter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectfromString(java.lang.String str)Unmarshals an Object from its single value representation.java.lang.StringtoString(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
-
-