(
TimePoint<U, T> context,
ChronoElement<?> element,
boolean forward
)
| 441 | |
| 442 | // wildcard capture |
| 443 | private static <U, T extends TimePoint<U, T>> T add( |
| 444 | TimePoint<U, T> context, |
| 445 | ChronoElement<?> element, |
| 446 | boolean forward |
| 447 | ) { |
| 448 | |
| 449 | U unit = context.getChronology().getBaseUnit(element); |
| 450 | |
| 451 | if (forward) { |
| 452 | return context.plus(1, unit); |
| 453 | } else { |
| 454 | return context.minus(1, unit); |
| 455 | } |
| 456 | |
| 457 | } |
| 458 | |
| 459 | } |