Class PatternReader


  • public class PatternReader
    extends Object
    Reads and parses a date time pattern, such as YYYY-mm-dd. Accepts a visitor object with methods that are called when a token of the pattern is encountered. These callback methods may be used for example to transform the pattern into a different pattern.
    • Method Detail

      • parsePattern

        public static void parsePattern​(CharSequence sequence,
                                        PatternReader.TokenVisitor visitor)
        Parses the given pattern and calls the visitor for each encountered pattern.
        Parameters:
        sequence - String with the pattern to process.
        visitor - Visitor to call for each encountered token of the pattern.