src/main/java/walkingkooka/datetime/DateTimeFormatterPatternComponent.java
/**
     * Returns the {@link DateTimeFormatterPatternComponent} for the given character.
     */
Returns the  DateTimeFormatterPatternComponent for the given character.
Returns the DateTimeFormatterPatternComponent for the given character .
static DateTimeFormatterPatternComponent ofCharacter(final char c) {
        DateTimeFormatterPatternComponent component;
        switch (c) {
            case DateTimeFormatterPatternVisitor.ERA:
                component = ERA;
                break;
            case DateTimeFormatterPatternVisitor.YEAR:
                component = YEAR;
                break;
            case DateTimeFormatterPatternVisitor.YEAR_OF_ERA:
                component = YEAR_OF_ERA;
                break;
            case DateTimeFormatterPatternVisitor.DAY_OF_YEAR:
                component = DAY_OF_YEAR;
                break;
            case DateTimeFormatterPatternVisitor.MONTH_OF_YEAR:
                component = MONTH_OF_YEAR;
                break;
            case DateTimeFormatterPatternVisitor.STANDALONE_MONTH_OF_YEAR:
                component = MONTH_OF_YEAR_STANDALONE;
                break;
            case DateTimeFormatterPatternVisitor.DAY_OF_MONTH:
                component = DAY_OF_MONTH;
                break;
            case DateTimeFormatterPatternVisitor.MODIFIED_JULIAN_DAY:
                component = MODIFIED_JULIAN_DAY;
                break;
            case DateTimeFormatterPatternVisitor.QUARTER_OF_YEAR:
                component = QUARTER_OF_YEAR;
                break;
            case DateTimeFormatterPatternVisitor.STANDALONE_QUARTER_OF_YEAR:
                component = STANDALONE_QUARTER_OF_YEAR;
                break;
            case DateTimeFormatterPatternVisitor.WEEK_BASED_YEAR:
                component = WEEK_BASED_YEAR;
                break;
            case DateTimeFormatterPatternVisitor.WEEK_OF_WEEK_BASED_YEAR:
                component = WEEK_OF_WEEK_BASED_YEAR;
                break;
            case DateTimeFormatterPatternVisitor.WEEK_OF_MONTH:
                component = WEEK_OF_MONTH;
                break;
            case DateTimeFormatterPatternVisitor.DAY_OF_WEEK:
                component = DAY_OF_WEEK;
                break;
            case DateTimeFormatterPatternVisitor.LOCALIZED_DAY_OF_WEEK:
                component = LOCALIZED_DAY_OF_WEEK;
                break;
            case DateTimeFormatterPatternVisitor.STANDALONE_LOCALIZED_DAY_OF_WEEK:
                component = STANDALONE_LOCALIZED_DAY_OF_WEEK;
                break;
            case DateTimeFormatterPatternVisitor.WEEK_OF_MONTH_F:
                component = WEEK_OF_MONTH_F;
                break;
            case DateTimeFormatterPatternVisitor.AMPM_OF_DAY:
                component = AMPM_OF_DAY;
                break;
            case DateTimeFormatterPatternVisitor.CLOCK_HOUR_OF_AMPM12:
                component = CLOCK_HOUR_OF_AMPM12;
                break;
            case DateTimeFormatterPatternVisitor.HOUR_OF_AMPM11:
                component = HOUR_OF_AMPM11;
                break;
            case DateTimeFormatterPatternVisitor.CLOCK_HOUR_OF_AMPM24:
                component = CLOCK_HOUR_OF_AMPM24;
                break;
            case DateTimeFormatterPatternVisitor.HOUR_OF_DAY:
                component = HOUR_OF_DAY;
                break;
            case DateTimeFormatterPatternVisitor.MINUTE_OF_HOUR:
                component = MINUTE_OF_HOUR;
                break;
            case DateTimeFormatterPatternVisitor.SECOND_OF_MINUTE:
                component = SECOND_OF_MINUTE;
                break;
            case DateTimeFormatterPatternVisitor.FRACTION_OF_SECOND:
                component = FRACTION_OF_SECOND;
                break;
            case DateTimeFormatterPatternVisitor.MILLI_OF_DAY:
                component = MILLI_OF_DAY;
                break;
            case DateTimeFormatterPatternVisitor.NANO_OF_SECOND:
                component = NANO_OF_SECOND;
                break;
            case DateTimeFormatterPatternVisitor.NANO_OF_DAY:
                component = NANO_OF_DAY;
                break;
            case DateTimeFormatterPatternVisitor.TIMEZONE_ID:
                component = TIMEZONE_ID;
                break;
            case DateTimeFormatterPatternVisitor.GENERIC_TIMEZONE_NAME:
                component = GENERIC_TIMEZONE_NAME;
                break;
            case DateTimeFormatterPatternVisitor.TIMEZONE_NAME:
                component = TIMEZONE_NAME;
                break;
            case DateTimeFormatterPatternVisitor.LOCALIZED_ZONE_OFFSET:
                component = LOCALIZED_ZONE_OFFSET;
                break;
            case DateTimeFormatterPatternVisitor.ZONE_OFFSET_BIGX:
                component = ZONE_OFFSET_BIGX;
                break;
            case DateTimeFormatterPatternVisitor.ZONE_OFFSET_SMALLX:
                component = ZONE_OFFSET_SMALLX;
                break;
            case DateTimeFormatterPatternVisitor.ZONE_OFFSET_Z:
                component = ZONE_OFFSET_Z;
                break;
            case DateTimeFormatterPatternVisitor.PAD:
                component = PAD;
                break;
            case DateTimeFormatterPatternVisitor.ESCAPE:
                component = ESCAPE;
                break;
            case DateTimeFormatterPatternVisitor.OPTIONAL_START:
                component = OPTIONAL_START;
                break;
            case DateTimeFormatterPatternVisitor.OPTIONAL_END:
                component = OPTIONAL_END;
                break;
            case DateTimeFormatterPatternVisitor.RESERVED_HASH:
                component = RESERVED_HASH;
                break;
            case DateTimeFormatterPatternVisitor.RESERVED_BRACE_OPEN:
                component = RESERVED_BRACE_OPEN;
                break;
            case DateTimeFormatterPatternVisitor.RESERVED_BRACE_CLOSE:
                component = RESERVED_BRACE_CLOSE;
                break;
            case 'B':
            case 'C':
            case 'I':
            case 'J':
            case 'P':
            case 'R':
            case 'T':
            case 'U':
            case 'b':
            case 'f':
            case 'i':
            case 'j':
            case 'l':
            case 'o':
            case 'r':
            case 't':
                component = ILLEGAL;
                break;
            default:
                component = LITERAL;
                break;
        }
        return component;
    }
static DateTimeFormatterPatternComponent ofCharacter ( final char c ) { DateTimeFormatterPatternComponent component ; switch ( c ) { case DateTimeFormatterPatternVisitor . ERA : component = ERA ; break ; case DateTimeFormatterPatternVisitor . YEAR : component = YEAR ; break ; case DateTimeFormatterPatternVisitor . YEAR_OF_ERA : component = YEAR_OF_ERA ; break ; case DateTimeFormatterPatternVisitor . DAY_OF_YEAR : component = DAY_OF_YEAR ; break ; case DateTimeFormatterPatternVisitor . MONTH_OF_YEAR : component = MONTH_OF_YEAR ; break ; case DateTimeFormatterPatternVisitor . STANDALONE_MONTH_OF_YEAR : component = MONTH_OF_YEAR_STANDALONE ; break ; case DateTimeFormatterPatternVisitor . DAY_OF_MONTH : component = DAY_OF_MONTH ; break ; case DateTimeFormatterPatternVisitor . MODIFIED_JULIAN_DAY : component = MODIFIED_JULIAN_DAY ; break ; case DateTimeFormatterPatternVisitor . QUARTER_OF_YEAR : component = QUARTER_OF_YEAR ; break ; case DateTimeFormatterPatternVisitor . STANDALONE_QUARTER_OF_YEAR : component = STANDALONE_QUARTER_OF_YEAR ; break ; case DateTimeFormatterPatternVisitor . WEEK_BASED_YEAR : component = WEEK_BASED_YEAR ; break ; case DateTimeFormatterPatternVisitor . WEEK_OF_WEEK_BASED_YEAR : component = WEEK_OF_WEEK_BASED_YEAR ; break ; case DateTimeFormatterPatternVisitor . WEEK_OF_MONTH : component = WEEK_OF_MONTH ; break ; case DateTimeFormatterPatternVisitor . DAY_OF_WEEK : component = DAY_OF_WEEK ; break ; case DateTimeFormatterPatternVisitor . LOCALIZED_DAY_OF_WEEK : component = LOCALIZED_DAY_OF_WEEK ; break ; case DateTimeFormatterPatternVisitor . STANDALONE_LOCALIZED_DAY_OF_WEEK : component = STANDALONE_LOCALIZED_DAY_OF_WEEK ; break ; case DateTimeFormatterPatternVisitor . WEEK_OF_MONTH_F : component = WEEK_OF_MONTH_F ; break ; case DateTimeFormatterPatternVisitor . AMPM_OF_DAY : component = AMPM_OF_DAY ; break ; case DateTimeFormatterPatternVisitor . CLOCK_HOUR_OF_AMPM12 : component = CLOCK_HOUR_OF_AMPM12 ; break ; case DateTimeFormatterPatternVisitor . HOUR_OF_AMPM11 : component = HOUR_OF_AMPM11 ; break ; case DateTimeFormatterPatternVisitor . CLOCK_HOUR_OF_AMPM24 : component = CLOCK_HOUR_OF_AMPM24 ; break ; case DateTimeFormatterPatternVisitor . HOUR_OF_DAY : component = HOUR_OF_DAY ; break ; case DateTimeFormatterPatternVisitor . MINUTE_OF_HOUR : component = MINUTE_OF_HOUR ; break ; case DateTimeFormatterPatternVisitor . SECOND_OF_MINUTE : component = SECOND_OF_MINUTE ; break ; case DateTimeFormatterPatternVisitor . FRACTION_OF_SECOND : component = FRACTION_OF_SECOND ; break ; case DateTimeFormatterPatternVisitor . MILLI_OF_DAY : component = MILLI_OF_DAY ; break ; case DateTimeFormatterPatternVisitor . NANO_OF_SECOND : component = NANO_OF_SECOND ; break ; case DateTimeFormatterPatternVisitor . NANO_OF_DAY : component = NANO_OF_DAY ; break ; case DateTimeFormatterPatternVisitor . TIMEZONE_ID : component = TIMEZONE_ID ; break ; case DateTimeFormatterPatternVisitor . GENERIC_TIMEZONE_NAME : component = GENERIC_TIMEZONE_NAME ; break ; case DateTimeFormatterPatternVisitor . TIMEZONE_NAME : component = TIMEZONE_NAME ; break ; case DateTimeFormatterPatternVisitor . LOCALIZED_ZONE_OFFSET : component = LOCALIZED_ZONE_OFFSET ; break ; case DateTimeFormatterPatternVisitor . ZONE_OFFSET_BIGX : component = ZONE_OFFSET_BIGX ; break ; case DateTimeFormatterPatternVisitor . ZONE_OFFSET_SMALLX : component = ZONE_OFFSET_SMALLX ; break ; case DateTimeFormatterPatternVisitor . ZONE_OFFSET_Z : component = ZONE_OFFSET_Z ; break ; case DateTimeFormatterPatternVisitor . PAD : component = PAD ; break ; case DateTimeFormatterPatternVisitor . ESCAPE : component = ESCAPE ; break ; case DateTimeFormatterPatternVisitor . OPTIONAL_START : component = OPTIONAL_START ; break ; case DateTimeFormatterPatternVisitor . OPTIONAL_END : component = OPTIONAL_END ; break ; case DateTimeFormatterPatternVisitor . RESERVED_HASH : component = RESERVED_HASH ; break ; case DateTimeFormatterPatternVisitor . RESERVED_BRACE_OPEN : component = RESERVED_BRACE_OPEN ; break ; case DateTimeFormatterPatternVisitor . RESERVED_BRACE_CLOSE : component = RESERVED_BRACE_CLOSE ; break ; case 'B' : case 'C' : case 'I' : case 'J' : case 'P' : case 'R' : case 'T' : case 'U' : case 'b' : case 'f' : case 'i' : case 'j' : case 'l' : case 'o' : case 'r' : case 't' : component = ILLEGAL ; break ; default : component = LITERAL ; break ; } return component ; }
Returns the {@link DateTimeFormatterPatternComponent} for the given character.
Returns the { @link DateTimeFormatterPatternComponent } for the given character .