Module org.tquadrat.foundation.util
Class TimeZoneStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.TimeZoneStringConverter
- All Implemented Interfaces:
Serializable,StringConverter<TimeZone>
@ClassVersion(sourceVersion="$Id: TimeZoneStringConverter.java 1091 2024-01-25 23:10:08Z tquadrat $")
@API(status=STABLE,
since="0.0.6")
public final class TimeZoneStringConverter
extends Object
implements StringConverter<TimeZone>
An implementation of
StringConverter
for
TimeZone
values.
The method
fromString(CharSequence)
will use
TimeZone.getTimeZone(String)
to retrieve a TimeZone based on the given value.
The method
toString(TimeZone)
will use
TimeZone.getID()
to do the conversion to a String.
- Note:
-
- The class
TimeZoneis considered outdated.
- The class
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: TimeZoneStringConverter.java 1091 2024-01-25 23:10:08Z tquadrat $
- Since:
- 0.0.6
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.util.stringconverter.TimeZoneStringConverter"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TimeZoneStringConverterAn instance of this class.static final StringThe error message for an invalid or unknown time zone id on the command line: "Unknown TimeZone: %1$s".Fields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofTimeZoneStringConverter. -
Method Summary
Modifier and TypeMethodDescriptionfinal TimeZonefromString(CharSequence source) static final TimeZoneStringConverterprovider()This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.final String
-
Field Details
-
MSG_UnknownTimeZone
The error message for an invalid or unknown time zone id on the command line: "Unknown TimeZone: %1$s".- See Also:
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
TimeZoneStringConverter
public TimeZoneStringConverter()Creates a new instance ofTimeZoneStringConverter.
-
-
Method Details
-
fromString
- Specified by:
fromStringin interfaceStringConverter<TimeZone>- Throws:
IllegalArgumentException
-
provider
This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.- Returns:
- The instance for this
StringConverterimplementation.
-
toString
- Specified by:
toStringin interfaceStringConverter<TimeZone>
-
