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

public Class ZoneIdConverter

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

Converts a ZoneId instance to string.
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 ZoneId
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

ZoneIdConverterback to summary
public ZoneIdConverter()

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 ZoneId 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:ZoneId

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