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

Method convert

base/src/main/java/net/time4j/Duration.java:3430–3441  ·  view source on GitHub ↗
(
        TimeSpan<U> timespan
    )

Source from the content-addressed store, hash-verified

3428 }
3429
3430 private static <U extends IsoUnit> Duration<U> convert(
3431 TimeSpan<U> timespan
3432 ) {
3433
3434 if (timespan instanceof Duration) {
3435 return cast(timespan);
3436 } else {
3437 Duration<U> zero = ofZero();
3438 return zero.plus(timespan);
3439 }
3440
3441 }
3442
3443 private boolean isFractionUnit(IsoUnit unit) {
3444

Callers 1

withMethod · 0.95

Calls 3

castMethod · 0.95
ofZeroMethod · 0.95
plusMethod · 0.45

Tested by

no test coverage detected