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

Method union

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

Source from the content-addressed store, hash-verified

1791 * @see #plus(TimeSpan)
1792 */
1793 public List<Duration<U>> union(TimeSpan<? extends U> timespan) {
1794
1795 Duration<U> merged = merge(this, timespan);
1796
1797 if (merged == null) {
1798 List<Duration<U>> result = new ArrayList<>();
1799 result.add(this);
1800 Duration<U> empty = ofZero();
1801 Duration<U> other = empty.plus(timespan);
1802 result.add(other);
1803 return Collections.unmodifiableList(result);
1804 }
1805
1806 return Collections.singletonList(merged);
1807
1808 }
1809
1810 /**
1811 * <p>Creates a composition of a calendar period and a clock period. </p>

Callers

nothing calls this directly

Calls 4

mergeMethod · 0.95
ofZeroMethod · 0.95
addMethod · 0.45
plusMethod · 0.45

Tested by

no test coverage detected