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

Method getEnd

base/src/main/java/net/time4j/DayPeriod.java:362–377  ·  view source on GitHub ↗
(PlainTime context)

Source from the content-addressed store, hash-verified

360 * @since 3.13/4.10
361 */
362 public PlainTime getEnd(PlainTime context) {
363
364 PlainTime compare = (
365 (context.getHour() == 24)
366 ? PlainTime.midnightAtStartOfDay()
367 : context);
368
369 for (PlainTime key : this.codeMap.keySet()) {
370 if (compare.isBefore(key)) {
371 return key;
372 }
373 }
374
375 return this.codeMap.firstKey();
376
377 }
378
379 @Override
380 public boolean equals(Object obj) {

Callers 1

resolveMethod · 0.95

Calls 4

midnightAtStartOfDayMethod · 0.95
isBeforeMethod · 0.95
keySetMethod · 0.80
getHourMethod · 0.65

Tested by

no test coverage detected