Package org.sqlite.date
Class FastDateParser.CaseInsensitiveTextStrategy
java.lang.Object
org.sqlite.date.FastDateParser.Strategy
org.sqlite.date.FastDateParser.CaseInsensitiveTextStrategy
- Enclosing class:
FastDateParser
A strategy that handles a text field in the parsing pattern
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCaseInsensitiveTextStrategy(int field, Calendar definingCalendar, Locale locale) Construct a Strategy that parses a Text field -
Method Summary
Modifier and TypeMethodDescription(package private) booleanaddRegex(FastDateParser parser, StringBuilder regex) Generate aPatternregular expression to theStringBuilderwhich will accept this field(package private) voidsetCalendar(FastDateParser parser, Calendar cal, String value) Set the Calendar with the parsed field.Methods inherited from class org.sqlite.date.FastDateParser.Strategy
isNumber
-
Field Details
-
field
private final int field -
locale
-
lKeyValues
-
-
Constructor Details
-
CaseInsensitiveTextStrategy
Construct a Strategy that parses a Text field- Parameters:
field- The Calendar fielddefiningCalendar- The Calendar to uselocale- The Locale to use
-
-
Method Details
-
addRegex
Generate aPatternregular expression to theStringBuilderwhich will accept this field- Specified by:
addRegexin classFastDateParser.Strategy- Parameters:
parser- The parser calling this strategyregex- TheStringBuilderto append to- Returns:
- true, if this field will set the calendar; false, if this field is a constant value
-
setCalendar
Set the Calendar with the parsed field.The default implementation does nothing.
- Overrides:
setCalendarin classFastDateParser.Strategy- Parameters:
parser- The parser calling this strategycal- TheCalendarto setvalue- The parsed field to translate and set in cal
-