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

Method move

base/src/main/java/net/time4j/engine/StdOperator.java:425–440  ·  view source on GitHub ↗
(
        T entity,
        boolean forward
    )

Source from the content-addressed store, hash-verified

423 }
424
425 private T move(
426 T entity,
427 boolean forward
428 ) {
429
430 if (entity instanceof TimePoint) {
431 TimePoint<?, ?> tp = TimePoint.class.cast(entity);
432 Object answer = add(tp, this.element, forward);
433 return entity.getChronology().getChronoType().cast(answer);
434 } else {
435 throw new ChronoException(
436 "Base units not supported by: "
437 + entity.getChronology().getChronoType());
438 }
439
440 }
441
442 // wildcard capture
443 private static <U, T extends TimePoint<U, T>> T add(

Callers 1

applyMethod · 0.95

Calls 4

addMethod · 0.95
castMethod · 0.45
getChronoTypeMethod · 0.45
getChronologyMethod · 0.45

Tested by

no test coverage detected