Top Description Constructors Methods
com.thoughtworks.xstream.converters.time

public Class ChronologyConverter

extends Object
implements SingleValueConverter
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.converters.SingleValueConverter, com.thoughtworks.xstream.converters.ConverterMatcher
Imports
java.time.DateTimeException, java.time.chrono.Chronology, com.thoughtworks.xstream.converters.ConversionException, .SingleValueConverter

Converts a Chronology instance to a string using its id.
Author
Jörg Schaible
Since
1.4.10

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
canConvert(final Class<T>
the Class representing the object type to be converted
type
)

Implements com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Determines whether the converter can marshall a particular type.
public Chronology
fromString(final String
the String with the single value of the Object
str
)

Implements com.thoughtworks.xstream.converters.SingleValueConverter.fromString.

Unmarshals an Object from its single value representation.
public String
toString(final Object
the Object to be converted
obj
)

Implements com.thoughtworks.xstream.converters.SingleValueConverter.toString.

Marshals an Object into a single value representation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ChronologyConverterback to summary
public ChronologyConverter()

Method Detail

canConvertback to summary
public boolean canConvert(final Class<T> type)

Implements com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Doc from com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Determines whether the converter can marshall a particular type.

Parameters
type:Class<T>

the Class representing the object type to be converted

Annotations
@Override
fromStringback to summary
public Chronology fromString(final String str)

Implements com.thoughtworks.xstream.converters.SingleValueConverter.fromString.

Doc from com.thoughtworks.xstream.converters.SingleValueConverter.fromString.

Unmarshals an Object from its single value representation.

Parameters
str:String

the String with the single value of the Object

Returns:Chronology

the Object

Annotations
@Override
toStringback to summary
public String toString(final Object obj)

Implements com.thoughtworks.xstream.converters.SingleValueConverter.toString.

Doc from com.thoughtworks.xstream.converters.SingleValueConverter.toString.

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

Annotations
@Override