Module org.tquadrat.foundation.util
Class PatternStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.PatternStringConverter
- All Implemented Interfaces:
Serializable
,StringConverter<Pattern>
@ClassVersion(sourceVersion="$Id: PatternStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $")
@API(status=STABLE,
since="0.0.6")
public final class PatternStringConverter
extends Object
implements StringConverter<Pattern>
An implementation of
StringConverter
for regular expressions that are stored as
Pattern
values.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: PatternStringConverter.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.PatternStringConverter"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternStringConverter
An instance of this class.static final String
The error message about an invalid regular expression: "\'%1$s\' is not a valid regular expression".Fields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Pattern
fromString
(CharSequence source) static final PatternStringConverter
provider()
This method is used by theServiceLoader
to obtain the instance for thisStringConverter
implementation.final String
-
Field Details
-
MSG_InvalidExpression
The error message about an invalid regular expression: "\'%1$s\' is not a valid regular expression".- See Also:
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
PatternStringConverter
public PatternStringConverter()Creates a new instance ofPatternStringConverter
.
-
-
Method Details
-
fromString
- Specified by:
fromString
in interfaceStringConverter<Pattern>
- Throws:
IllegalArgumentException
-
provider
This method is used by theServiceLoader
to obtain the instance for thisStringConverter
implementation.- Returns:
- The instance for this
StringConverter
implementation.
-
toString
- Specified by:
toString
in interfaceStringConverter<Pattern>
-