Class FastDateParser.CaseInsensitiveTextStrategy

java.lang.Object
org.sqlite.date.FastDateParser.Strategy
org.sqlite.date.FastDateParser.CaseInsensitiveTextStrategy
Enclosing class:
FastDateParser

private static class FastDateParser.CaseInsensitiveTextStrategy extends FastDateParser.Strategy
A strategy that handles a text field in the parsing pattern
  • Field Details

    • field

      private final int field
    • locale

      private final Locale locale
    • lKeyValues

      private final Map<String,Integer> lKeyValues
  • Constructor Details

    • CaseInsensitiveTextStrategy

      CaseInsensitiveTextStrategy(int field, Calendar definingCalendar, Locale locale)
      Construct a Strategy that parses a Text field
      Parameters:
      field - The Calendar field
      definingCalendar - The Calendar to use
      locale - The Locale to use
  • Method Details

    • addRegex

      boolean addRegex(FastDateParser parser, StringBuilder regex)
      Generate a Pattern regular expression to the StringBuilder which will accept this field
      Specified by:
      addRegex in class FastDateParser.Strategy
      Parameters:
      parser - The parser calling this strategy
      regex - The StringBuilder to append to
      Returns:
      true, if this field will set the calendar; false, if this field is a constant value
    • setCalendar

      void setCalendar(FastDateParser parser, Calendar cal, String value)
      Set the Calendar with the parsed field.

      The default implementation does nothing.

      Overrides:
      setCalendar in class FastDateParser.Strategy
      Parameters:
      parser - The parser calling this strategy
      cal - The Calendar to set
      value - The parsed field to translate and set in cal