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

Method apply

base/src/main/java/net/time4j/ZonalQuery.java:75–94  ·  view source on GitHub ↗
(Moment context)

Source from the content-addressed store, hash-verified

73 //~ Methoden ----------------------------------------------------------
74
75 @Override
76 public V apply(Moment context) {
77
78 ZonalOffset shift = (
79 (this.offset == null)
80 ? this.tz.getOffset(context)
81 : this.offset);
82
83 if (
84 (this.element == PlainTime.SECOND_OF_MINUTE)
85 && context.isLeapSecond()
86 && (shift.getFractionalAmount() == 0)
87 && ((shift.getAbsoluteSeconds() % 60) == 0)
88 ) {
89 return this.element.getType().cast(Integer.valueOf(60));
90 }
91
92 return PlainTimestamp.from(context, shift).get(this.element);
93
94 }
95
96}

Callers

nothing calls this directly

Calls 9

getFractionalAmountMethod · 0.95
getAbsoluteSecondsMethod · 0.95
fromMethod · 0.95
getOffsetMethod · 0.65
isLeapSecondMethod · 0.65
getTypeMethod · 0.65
getMethod · 0.65
castMethod · 0.45
valueOfMethod · 0.45

Tested by

no test coverage detected