src/main/java/walkingkooka/datetime/SimpleDateFormatPatternComponent.java
/**
     * Returns the {@link SimpleDateFormatPatternComponent} for the given character.
     */
Returns the  SimpleDateFormatPatternComponent for the given character.
Returns the SimpleDateFormatPatternComponent for the given character .
static SimpleDateFormatPatternComponent ofCharacter(final char c) {
        SimpleDateFormatPatternComponent component;
        switch (c) {
            case SimpleDateFormatPatternVisitor.ERA:
                component = ERA;
                break;
            case SimpleDateFormatPatternVisitor.YEAR:
                component = YEAR;
                break;
            case SimpleDateFormatPatternVisitor.WEEK_YEAR:
                component = WEEK_YEAR;
                break;
            case SimpleDateFormatPatternVisitor.MONTH_IN_YEAR_CONTEXT_SENSITIVE:
                component = MONTH_IN_YEAR_CONTEXT_SENSITIVE;
                break;
            case SimpleDateFormatPatternVisitor.MONTH_IN_YEAR_STANDALONE_FORM:
                component = MONTH_IN_YEAR_STANDALONE_FORM;
                break;
            case SimpleDateFormatPatternVisitor.WEEK_IN_YEAR:
                component = WEEK_IN_YEAR;
                break;
            case SimpleDateFormatPatternVisitor.WEEK_IN_MONTH:
                component = WEEK_IN_MONTH;
                break;
            case SimpleDateFormatPatternVisitor.DAY_IN_YEAR:
                component = DAY_IN_YEAR;
                break;
            case SimpleDateFormatPatternVisitor.DAY_IN_MONTH:
                component = DAY_IN_MONTH;
                break;
            case SimpleDateFormatPatternVisitor.DAY_OF_WEEK_IN_MONTH:
                component = DAY_OF_WEEK_IN_MONTH;
                break;
            case SimpleDateFormatPatternVisitor.DAY_NAME_IN_WEEK:
                component = DAY_NAME_IN_WEEK;
                break;
            case SimpleDateFormatPatternVisitor.DAY_NUMBER_OF_WEEK:
                component = DAY_NUMBER_OF_WEEK;
                break;
            case SimpleDateFormatPatternVisitor.AMPM:
                component = AMPM;
                break;
            case SimpleDateFormatPatternVisitor.HOUR_IN_DAY_23:
                component = HOUR_IN_DAY_23;
                break;
            case SimpleDateFormatPatternVisitor.HOUR_IN_DAY_24:
                component = HOUR_IN_DAY_24;
                break;
            case SimpleDateFormatPatternVisitor.HOUR_IN_AMPM_11:
                component = HOUR_IN_AMPM_11;
                break;
            case SimpleDateFormatPatternVisitor.HOUR_IN_AMPM_12:
                component = HOUR_IN_AMPM_12;
                break;
            case SimpleDateFormatPatternVisitor.MINUTE_OF_HOUR:
                component = MINUTE_OF_HOUR;
                break;
            case SimpleDateFormatPatternVisitor.SECOND_OF_MINUTE:
                component = SECOND_OF_MINUTE;
                break;
            case SimpleDateFormatPatternVisitor.MILLISECOND:
                component = MILLISECOND;
                break;
            case SimpleDateFormatPatternVisitor.GENERAL_TIMEZONE:
                component = GENERAL_TIMEZONE;
                break;
            case SimpleDateFormatPatternVisitor.RFC822_TIMEZONE:
                component = RFC822_TIMEZONE;
                break;
            case SimpleDateFormatPatternVisitor.ISO8601_TIMEZONE:
                component = ISO8601_TIMEZONE;
                break;
            case SimpleDateFormatPatternVisitor.ESCAPE:
                component = ESCAPE;
                break;
            case 'A':
            case 'B':
            case 'C':
            case 'I':
            case 'J':
            case 'N':
            case 'O':
            case 'P':
            case 'Q':
            case 'R':
            case 'T':
            case 'U':
            case 'V':
            case 'b':
            case 'c':
            case 'e':
            case 'f':
            case 'g':
            case 'i':
            case 'j':
            case 'l':
            case 'n':
            case 'o':
            case 'p':
            case 'q':
            case 'r':
            case 't':
            case 'v':
            case 'x':
                component = ILLEGAL;
                break;
            default:
                component = LITERAL;
                break;
        }
        return component;
    }
static SimpleDateFormatPatternComponent ofCharacter ( final char c ) { SimpleDateFormatPatternComponent component ; switch ( c ) { case SimpleDateFormatPatternVisitor . ERA : component = ERA ; break ; case SimpleDateFormatPatternVisitor . YEAR : component = YEAR ; break ; case SimpleDateFormatPatternVisitor . WEEK_YEAR : component = WEEK_YEAR ; break ; case SimpleDateFormatPatternVisitor . MONTH_IN_YEAR_CONTEXT_SENSITIVE : component = MONTH_IN_YEAR_CONTEXT_SENSITIVE ; break ; case SimpleDateFormatPatternVisitor . MONTH_IN_YEAR_STANDALONE_FORM : component = MONTH_IN_YEAR_STANDALONE_FORM ; break ; case SimpleDateFormatPatternVisitor . WEEK_IN_YEAR : component = WEEK_IN_YEAR ; break ; case SimpleDateFormatPatternVisitor . WEEK_IN_MONTH : component = WEEK_IN_MONTH ; break ; case SimpleDateFormatPatternVisitor . DAY_IN_YEAR : component = DAY_IN_YEAR ; break ; case SimpleDateFormatPatternVisitor . DAY_IN_MONTH : component = DAY_IN_MONTH ; break ; case SimpleDateFormatPatternVisitor . DAY_OF_WEEK_IN_MONTH : component = DAY_OF_WEEK_IN_MONTH ; break ; case SimpleDateFormatPatternVisitor . DAY_NAME_IN_WEEK : component = DAY_NAME_IN_WEEK ; break ; case SimpleDateFormatPatternVisitor . DAY_NUMBER_OF_WEEK : component = DAY_NUMBER_OF_WEEK ; break ; case SimpleDateFormatPatternVisitor . AMPM : component = AMPM ; break ; case SimpleDateFormatPatternVisitor . HOUR_IN_DAY_23 : component = HOUR_IN_DAY_23 ; break ; case SimpleDateFormatPatternVisitor . HOUR_IN_DAY_24 : component = HOUR_IN_DAY_24 ; break ; case SimpleDateFormatPatternVisitor . HOUR_IN_AMPM_11 : component = HOUR_IN_AMPM_11 ; break ; case SimpleDateFormatPatternVisitor . HOUR_IN_AMPM_12 : component = HOUR_IN_AMPM_12 ; break ; case SimpleDateFormatPatternVisitor . MINUTE_OF_HOUR : component = MINUTE_OF_HOUR ; break ; case SimpleDateFormatPatternVisitor . SECOND_OF_MINUTE : component = SECOND_OF_MINUTE ; break ; case SimpleDateFormatPatternVisitor . MILLISECOND : component = MILLISECOND ; break ; case SimpleDateFormatPatternVisitor . GENERAL_TIMEZONE : component = GENERAL_TIMEZONE ; break ; case SimpleDateFormatPatternVisitor . RFC822_TIMEZONE : component = RFC822_TIMEZONE ; break ; case SimpleDateFormatPatternVisitor . ISO8601_TIMEZONE : component = ISO8601_TIMEZONE ; break ; case SimpleDateFormatPatternVisitor . ESCAPE : component = ESCAPE ; break ; case 'A' : case 'B' : case 'C' : case 'I' : case 'J' : case 'N' : case 'O' : case 'P' : case 'Q' : case 'R' : case 'T' : case 'U' : case 'V' : case 'b' : case 'c' : case 'e' : case 'f' : case 'g' : case 'i' : case 'j' : case 'l' : case 'n' : case 'o' : case 'p' : case 'q' : case 'r' : case 't' : case 'v' : case 'x' : component = ILLEGAL ; break ; default : component = LITERAL ; break ; } return component ; }
Returns the {@link SimpleDateFormatPatternComponent} for the given character.
Returns the { @link SimpleDateFormatPatternComponent } for the given character .