| 498 | } |
| 499 | |
| 500 | @Override |
| 501 | public List<Item<U>> getTotalLength() { |
| 502 | |
| 503 | List<Item<U>> tmp = new ArrayList<>(2); |
| 504 | |
| 505 | if (this.seconds != 0) { |
| 506 | Object u = ((this.scale == UTC) ? SI.SECONDS : TimeUnit.SECONDS); |
| 507 | U unit = cast(u); |
| 508 | tmp.add(Item.of(Math.abs(this.seconds), unit)); |
| 509 | } |
| 510 | |
| 511 | if (this.nanos != 0) { |
| 512 | Object u = |
| 513 | ((this.scale == UTC) ? SI.NANOSECONDS : TimeUnit.NANOSECONDS); |
| 514 | U unit = cast(u); |
| 515 | tmp.add(Item.of(Math.abs(this.nanos), unit)); |
| 516 | } |
| 517 | |
| 518 | return Collections.unmodifiableList(tmp); |
| 519 | |
| 520 | } |
| 521 | |
| 522 | @Override |
| 523 | public boolean contains(Object unit) { |