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

Method getTotalLength

base/src/main/java/net/time4j/MachineTime.java:500–520  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 4

castMethod · 0.95
ofMethod · 0.95
addMethod · 0.45
absMethod · 0.45

Tested by

no test coverage detected