Class FastDateParser.Strategy
java.lang.Object
org.sqlite.date.FastDateParser.Strategy
- Direct Known Subclasses:
FastDateParser.CaseInsensitiveTextStrategy, FastDateParser.CopyQuotedStrategy, FastDateParser.ISO8601TimeZoneStrategy, FastDateParser.NumberStrategy, FastDateParser.TimeZoneStrategy
- Enclosing class:
FastDateParser
A strategy to parse a single field from the parsing pattern
- Since:
- 3.2
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract booleanaddRegex(FastDateParser parser, StringBuilder regex) Generate aPatternregular expression to theStringBuilderwhich will accept this field(package private) booleanisNumber()Is this field a number? The default implementation returns false.(package private) voidsetCalendar(FastDateParser parser, Calendar cal, String value) Set the Calendar with the parsed field.
-
Constructor Details
-
Strategy
private Strategy()
-
-
Method Details
-
isNumber
boolean isNumber()Is this field a number? The default implementation returns false.- Returns:
- true, if field is a number
-
setCalendar
Set the Calendar with the parsed field.The default implementation does nothing.
- Parameters:
parser- The parser calling this strategycal- TheCalendarto setvalue- The parsed field to translate and set in cal
-
addRegex
Generate aPatternregular expression to theStringBuilderwhich will accept this field- 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
-