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

Method resolve

base/src/main/java/net/time4j/Duration.java:4975–4989  ·  view source on GitHub ↗
(TimeSpan.Item<U> item)

Source from the content-addressed store, hash-verified

4973 }
4974
4975 @Override
4976 @SuppressWarnings("unchecked")
4977 protected TimeSpan.Item<U> resolve(TimeSpan.Item<U> item) {
4978
4979 IsoUnit unit = item.getUnit();
4980
4981 if (unit.equals(ClockUnit.MILLIS)) {
4982 return Item.of(Math.multiplyExact(item.getAmount(), 1_000_000L), (U) ClockUnit.NANOS);
4983 } else if (unit.equals(ClockUnit.MICROS)) {
4984 return Item.of(Math.multiplyExact(item.getAmount(), 1_000L), (U) ClockUnit.NANOS);
4985 }
4986
4987 return item;
4988
4989 }
4990
4991 }
4992

Callers

nothing calls this directly

Calls 4

ofMethod · 0.95
getUnitMethod · 0.45
equalsMethod · 0.45
getAmountMethod · 0.45

Tested by

no test coverage detected