Klasse AbstractPatternBasedConverter<T,P>
java.lang.Object
com.github.hypfvieh.cli.parser.converter.AbstractPatternBasedConverter<T,P>
- Alle implementierten Schnittstellen:
IValueConverter<T>
- Bekannte direkte Unterklassen:
DoubleConverter,LocalDateConverter,LocalDateTimeConverter,LocalTimeConverter
public abstract class AbstractPatternBasedConverter<T,P>
extends Object
implements IValueConverter<T>
Base converter using a list of patterns to find a suitable convert operation.
Allows adding additional number patterns by using addPattern(P).
Will use the first pattern which successfully parsed the input string.
- Seit:
- 1.0.0 - 2022-05-05
- Autor:
- David M., Markus S.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddPattern(P _pattern) Adds a pattern.protected System.LoggerAccess to the logger for subclass objects.Returns the list of patternsVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden com.github.hypfvieh.cli.parser.converter.IValueConverter
convert
-
Konstruktordetails
-
AbstractPatternBasedConverter
public AbstractPatternBasedConverter()
-
-
Methodendetails
-
addPattern
Adds a pattern.- Parameter:
_pattern- pattern
-
getLogger
Access to the logger for subclass objects.- Gibt zurück:
- logger
-
getPatterns
Returns the list of patterns- Gibt zurück:
- patterns
-