(
T entity,
boolean forward
)
| 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( |
no test coverage detected