Module org.tquadrat.foundation.util
Class UUIDStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.UUIDStringConverter
- All Implemented Interfaces:
Serializable,StringConverter<UUID>
@ClassVersion(sourceVersion="$Id: UUIDStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $")
@API(status=STABLE,
since="0.0.6")
public final class UUIDStringConverter
extends Object
implements StringConverter<UUID>
An implementation of
StringConverter
for
UUID
values.
The method
fromString(CharSequence)
will use
UniqueIdUtils.uuidFromString(CharSequence)
to create a UUID instance based on the given value.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: UUIDStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $
- Since:
- 0.0.6
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.util.stringconverter.UUIDStringConverter"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UUIDStringConverterAn instance of this class.static final StringThe error message for an invalid UUID on the command line: "\'%1$s\' cannot be parsed as a valid UUID".Fields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal UUIDfromString(CharSequence source) static final UUIDStringConverterprovider()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_InvalidUUIDFormat
The error message for an invalid UUID on the command line: "\'%1$s\' cannot be parsed as a valid UUID".- See Also:
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
UUIDStringConverter
public UUIDStringConverter()Creates a new instance ofUUIDStringConverter.
-
-
Method Details
-
fromString
- Specified by:
fromStringin interfaceStringConverter<UUID>- Throws:
IllegalArgumentException
-
provider
This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.- Returns:
- The instance for this
StringConverterimplementation.
-
