Module org.tquadrat.foundation.util
Class CharacterStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.CharacterStringConverter
- All Implemented Interfaces:
Serializable,StringConverter<Character>
@ClassVersion(sourceVersion="$Id: CharacterStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $")
@API(status=STABLE,
since="0.0.6")
public final class CharacterStringConverter
extends Object
implements StringConverter<Character>
An implementation of
Calling
StringConverter
for
Character
values.Calling
fromString(CharSequence)
with an empty String will cause an
IllegalArgumentException.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: CharacterStringConverter.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.CharacterStringConverter"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CharacterStringConverterAn instance of this class.static final StringThe error message for an invalid character on the command line: "Not a valid Character: \'%s\'".Fields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofCharacterStringConverter. -
Method Summary
Modifier and TypeMethodDescriptionfinal CharacterfromString(CharSequence source) final Collection<Class<?>> Provides the subject class for this converter.static final CharacterStringConverterprovider()This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.final String
-
Field Details
-
MSG_InvalidCharacter
The error message for an invalid character on the command line: "Not a valid Character: \'%s\'".- See Also:
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
CharacterStringConverter
public CharacterStringConverter()Creates a new instance ofCharacterStringConverter.
-
-
Method Details
-
fromString
- Specified by:
fromStringin interfaceStringConverter<Character>- Throws:
IllegalArgumentException
-
getSubjectClass
Provides the subject class for this converter.- Returns:
- The subject class.
-
provider
This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.- Returns:
- The instance for this
StringConverterimplementation.
-
toString
- Specified by:
toStringin interfaceStringConverter<Character>
-
