Module org.tquadrat.foundation.util
Class ZoneIdStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.ZoneIdStringConverter
- All Implemented Interfaces:
Serializable,StringConverter<ZoneId>
@ClassVersion(sourceVersion="$Id: ZoneIdStringConverter.java 1091 2024-01-25 23:10:08Z tquadrat $")
@API(status=STABLE,
since="0.0.6")
public final class ZoneIdStringConverter
extends Object
implements StringConverter<ZoneId>
An implementation of
StringConverter
for
ZoneId
values.
The method
fromString(CharSequence)
will use
DateTimeUtils.retrieveCachedZoneId(String,java.util.Map)
to retrieve a ZoneId based on the given value. The second parameter
will be retrieved by a call to
DateTimeUtils.getZoneIdAliasMap().
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: ZoneIdStringConverter.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.ZoneIdStringConverter"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ZoneIdStringConverterAn instance of this class.static final StringThe error message for an invalid zone id on the command line: "\'%1$s\' cannot be parsed as a valid time zone id".Fields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ZoneIdfromString(CharSequence source) static final ZoneIdStringConverterprovider()This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tquadrat.foundation.lang.StringConverter
toString
-
Field Details
-
MSG_InvalidZoneId
The error message for an invalid zone id on the command line: "\'%1$s\' cannot be parsed as a valid time zone id".- See Also:
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
ZoneIdStringConverter
public ZoneIdStringConverter()Creates a new instance ofZoneIdStringConverter.
-
-
Method Details
-
fromString
- Specified by:
fromStringin interfaceStringConverter<ZoneId>- Throws:
IllegalArgumentException
-
provider
This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.- Returns:
- The instance for this
StringConverterimplementation.
-
