Class YesNoValueHandler.YesNoStringConverter
java.lang.Object
org.tquadrat.foundation.config.cli.YesNoValueHandler.YesNoStringConverter
- All Implemented Interfaces:
Serializable
,StringConverter<Boolean>
- Enclosing class:
YesNoValueHandler
@ClassVersion(sourceVersion="$Id: YesNoValueHandler.java 1078 2023-10-19 14:39:47Z tquadrat $")
@API(status=STABLE,
since="0.0.1")
private static final class YesNoValueHandler.YesNoStringConverter
extends Object
implements StringConverter<Boolean>
An implementation of
StringConverter
that translates 'yes' in various languages into true
.
'yes', 'true' and 'ok' will always be taken as true
, the
other variants only when valid for the current locale/language.
- Author:
- Thomas Thrien - thomas.thrien@tquadrat.org
- Version:
- $Id: YesNoValueHandler.java 1078 2023-10-19 14:39:47Z tquadrat $
- Since:
- 0.0.1
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.config.cli.YesNoValueHandler.YesNoStringConverter"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final YesNoValueHandler.YesNoStringConverter
The one and only instance for thisStringConverter
.The various forms of 'yes'.Fields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tquadrat.foundation.lang.StringConverter
toString
-
Field Details
-
INSTANCE
The one and only instance for thisStringConverter
. -
YES
The various forms of 'yes'.
-
-
Constructor Details
-
YesNoStringConverter
public YesNoStringConverter()Creates a new instance ofYesNoValueStringConverter
.
-
-
Method Details
-
fromString
- Specified by:
fromString
in interfaceStringConverter<Boolean>
- Throws:
IllegalArgumentException
-