Package javax.time.calendar.DateTimeFieldRule

Examples of javax.time.calendar.DateTimeFieldRule.TextStore


        int length = parseText.length();
        if (position > length) {
            throw new IndexOutOfBoundsException();
        }
        if (context.isStrict()) {
            TextStore textStore = rule.getTextStore(context.getLocale(), textStyle);
            if (textStore != null) {
                long match = textStore.matchText(!context.isCaseSensitive(), parseText.substring(position));
                if (match == 0) {
                    return ~position;
                } else if (match > 0) {
                    position += (match >>> 32);
                    context.setParsed(rule, (int) match);
                    return position;
                }
            }
            return numberPrinterParser().parse(context, parseText, position);
        } else {
            for (TextStyle textStyle : TextStyle.values()) {
                TextStore textStore = rule.getTextStore(context.getLocale(), textStyle);
                if (textStore != null) {
                    long match = textStore.matchText(!context.isCaseSensitive(), parseText.substring(position));
                    if (match > 0) {
                        position += (match >>> 32);
                        context.setParsed(rule, (int) match);
                        return position;
                    }
View Full Code Here

TOP

Related Classes of javax.time.calendar.DateTimeFieldRule.TextStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.