Class DateTimeFormatterBuilder.ZoneTextPrinterParser

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Comparator<java.lang.String> LENGTH_COMPARATOR
      The text style to output.
      private TextStyle textStyle
      The text style to output.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int parse​(DateTimeParseContext context, java.lang.CharSequence text, int position)
      Parses text into date-time information.
      private int parseOffset​(DateTimeParseContext context, java.lang.CharSequence text, int position, java.lang.String prefix)  
      boolean print​(DateTimePrintContext context, java.lang.StringBuilder buf)
      Prints the date-time object to the buffer.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LENGTH_COMPARATOR

        private static final java.util.Comparator<java.lang.String> LENGTH_COMPARATOR
        The text style to output.
      • textStyle

        private final TextStyle textStyle
        The text style to output.
    • Constructor Detail

      • ZoneTextPrinterParser

        ZoneTextPrinterParser​(TextStyle textStyle)
    • Method Detail

      • print

        public boolean print​(DateTimePrintContext context,
                             java.lang.StringBuilder buf)
        Description copied from interface: DateTimeFormatterBuilder.DateTimePrinterParser
        Prints the date-time object to the buffer.

        The context holds information to use during the print. It also contains the date-time information to be printed.

        The buffer must not be mutated beyond the content controlled by the implementation.

        Specified by:
        print in interface DateTimeFormatterBuilder.DateTimePrinterParser
        Parameters:
        context - the context to print using, not null
        buf - the buffer to append to, not null
        Returns:
        false if unable to query the value from the date-time, true otherwise
      • parse

        public int parse​(DateTimeParseContext context,
                         java.lang.CharSequence text,
                         int position)
        Description copied from interface: DateTimeFormatterBuilder.DateTimePrinterParser
        Parses text into date-time information.

        The context holds information to use during the parse. It is also used to store the parsed date-time information.

        Specified by:
        parse in interface DateTimeFormatterBuilder.DateTimePrinterParser
        Parameters:
        context - the context to use and parse into, not null
        text - the input text to parse, not null
        position - the position to start parsing at, from 0 to the text length
        Returns:
        the new parse position, where negative means an error with the error position encoded using the complement ~ operator
      • parseOffset

        private int parseOffset​(DateTimeParseContext context,
                                java.lang.CharSequence text,
                                int position,
                                java.lang.String prefix)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object