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

Method preformat

base/src/main/java/net/time4j/Moment.java:3133–3147  ·  view source on GitHub ↗
(
            Moment context,
            AttributeQuery attributes
        )

Source from the content-addressed store, hash-verified

3131 }
3132
3133 @Override
3134 public ChronoDisplay preformat(
3135 Moment context,
3136 AttributeQuery attributes
3137 ) {
3138
3139 if (attributes.contains(Attributes.TIMEZONE_ID)) {
3140 TZID tzid = attributes.get(Attributes.TIMEZONE_ID);
3141 TimeScale scale = attributes.get(Attributes.TIME_SCALE, TimeScale.UTC);
3142 return context.transformForPrint(scale).inZonalView(tzid);
3143 }
3144
3145 throw new IllegalArgumentException("Cannot print moment without timezone.");
3146
3147 }
3148
3149 @Override
3150 public Chronology<?> preparser() {

Callers

nothing calls this directly

Calls 4

transformForPrintMethod · 0.80
containsMethod · 0.65
getMethod · 0.65
inZonalViewMethod · 0.45

Tested by

no test coverage detected