Class FastDateParser.Strategy

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Strategy()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) abstract boolean addRegex​(FastDateParser parser, java.lang.StringBuilder regex)
      Generate a Pattern regular expression to the StringBuilder which will accept this field
      (package private) boolean isNumber()
      Is this field a number? The default implementation returns false.
      (package private) void setCalendar​(FastDateParser parser, java.util.Calendar cal, java.lang.String value)
      Set the Calendar with the parsed field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Strategy

        private Strategy()
    • Method Detail

      • isNumber

        boolean isNumber()
        Is this field a number? The default implementation returns false.
        Returns:
        true, if field is a number
      • setCalendar

        void setCalendar​(FastDateParser parser,
                         java.util.Calendar cal,
                         java.lang.String value)
        Set the Calendar with the parsed field. The default implementation does nothing.
        Parameters:
        parser - The parser calling this strategy
        cal - The Calendar to set
        value - The parsed field to translate and set in cal
      • addRegex

        abstract boolean addRegex​(FastDateParser parser,
                                  java.lang.StringBuilder regex)
        Generate a Pattern regular expression to the StringBuilder which will accept this field
        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