MCPcopy Create free account
hub / github.com/MenoData/Time4J / loadTextForms

Method loadTextForms

base/src/main/java/net/time4j/DayPeriod.java:569–585  ·  view source on GitHub ↗
(
        Locale locale,
        String calendarType
    )

Source from the content-addressed store, hash-verified

567 }
568
569 private static Map<String, String> loadTextForms(
570 Locale locale,
571 String calendarType
572 ) {
573
574 Map<String, String> map = CalendarText.getInstance(calendarType, locale).getTextForms();
575
576 if (
577 !calendarType.equals(CalendarText.ISO_CALENDAR_TYPE)
578 && !"true".equals(map.get("hasDayPeriods"))
579 ) {
580 map = CalendarText.getIsoInstance(locale).getTextForms(); // fallback
581 }
582
583 return map;
584
585 }
586
587 private static boolean accept(String key) {
588

Callers 4

ofMethod · 0.95
getValueMethod · 0.80
parseMethod · 0.80
applyMethod · 0.80

Calls 5

getInstanceMethod · 0.95
getIsoInstanceMethod · 0.95
getMethod · 0.65
getTextFormsMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected