Package org.threeten.bp.format.SimpleDateTimeTextProvider

Examples of org.threeten.bp.format.SimpleDateTimeTextProvider.LocaleStore


    public DateTimeFormatterBuilder appendText(TemporalField field, Map<Long, String> textLookup) {
        Jdk8Methods.requireNonNull(field, "field");
        Jdk8Methods.requireNonNull(textLookup, "textLookup");
        Map<Long, String> copy = new LinkedHashMap<Long, String>(textLookup);
        Map<TextStyle, Map<Long, String>> map = Collections.singletonMap(TextStyle.FULL, copy);
        final LocaleStore store = new LocaleStore(map);
        DateTimeTextProvider provider = new DateTimeTextProvider() {
            @Override
            public String getText(TemporalField field, long value, TextStyle style, Locale locale) {
                return store.getText(value, style);
            }
            @Override
            public Iterator<Entry<String, Long>> getTextIterator(TemporalField field, TextStyle style, Locale locale) {
                return store.getTextIterator(style);
            }
            @Override
            public Locale[] getAvailableLocales() {
                throw new UnsupportedOperationException();
            }
View Full Code Here

TOP

Related Classes of org.threeten.bp.format.SimpleDateTimeTextProvider.LocaleStore

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.