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

Method toPrefix

base/src/main/java/net/time4j/DayPeriod.java:543–567  ·  view source on GitHub ↗
(
        TextWidth tw,
        OutputContext oc
    )

Source from the content-addressed store, hash-verified

541 }
542
543 private static String toPrefix(
544 TextWidth tw,
545 OutputContext oc
546 ) {
547
548 char c;
549
550 switch (tw) {
551 case WIDE:
552 c = 'w';
553 break;
554 case NARROW:
555 c = 'n';
556 break;
557 default:
558 c = 'a';
559 }
560
561 if (oc == OutputContext.STANDALONE) {
562 c = Character.toUpperCase(c);
563 }
564
565 return "P(" + c + ")_";
566
567 }
568
569 private static Map<String, String> loadTextForms(
570 Locale locale,

Callers 1

createKeyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected