Skip to content

Commit fabaa95

Browse files
SherifMakhloufakarnokd
authored andcommitted
1.x: concatDelayError multiple arguments (#4261)
* Adds concatDelayError with multiple arguments * Adds Tests for concatDelayError multiple arguments * Updates wording
1 parent b3a0446 commit fabaa95

File tree

2 files changed

+577
-0
lines changed

2 files changed

+577
-0
lines changed

src/main/java/rx/Observable.java

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,270 @@ public static <T> Observable<T> concatDelayError(Iterable<? extends Observable<?
14521452
return concatDelayError(from(sources));
14531453
}
14541454

1455+
/**
1456+
* Returns an Observable that emits the items emitted by two Observables, one after the other, without
1457+
* interleaving them, and delays any errors till all Observables terminate.
1458+
*
1459+
* <dl>
1460+
* <dt><b>Backpressure:</b></dt>
1461+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1462+
* sources are expected to honor backpressure as well.
1463+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1464+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1465+
* <dt><b>Scheduler:</b></dt>
1466+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1467+
* </dl>
1468+
*
1469+
* @param <T> the common element base type
1470+
* @param t1
1471+
* an Observable to be concatenated
1472+
* @param t2
1473+
* an Observable to be concatenated
1474+
* @return an Observable with the concatenating behavior
1475+
*/
1476+
@Experimental
1477+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2) {
1478+
return concatDelayError(just(t1, t2));
1479+
}
1480+
1481+
/**
1482+
* Returns an Observable that emits the items emitted by three Observables, one after the other, without
1483+
* interleaving them, and delays any errors till all Observables terminate.
1484+
*
1485+
* <dl>
1486+
* <dt><b>Backpressure:</b></dt>
1487+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1488+
* sources are expected to honor backpressure as well.
1489+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1490+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1491+
* <dt><b>Scheduler:</b></dt>
1492+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1493+
* </dl>
1494+
*
1495+
* @param <T> the common element base type
1496+
* @param t1
1497+
* an Observable to be concatenated
1498+
* @param t2
1499+
* an Observable to be concatenated
1500+
* @param t3
1501+
* an Observable to be concatenated
1502+
* @return an Observable with the concatenating behavior
1503+
*/
1504+
@Experimental
1505+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2,Observable<? extends T> t3 ) {
1506+
return concatDelayError(just(t1, t2, t3));
1507+
}
1508+
1509+
/**
1510+
* Returns an Observable that emits the items emitted by four Observables, one after the other, without
1511+
* interleaving them, and delays any errors till all Observables terminate.
1512+
*
1513+
* <dl>
1514+
* <dt><b>Backpressure:</b></dt>
1515+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1516+
* sources are expected to honor backpressure as well.
1517+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1518+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1519+
* <dt><b>Scheduler:</b></dt>
1520+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1521+
* </dl>
1522+
*
1523+
* @param <T> the common element base type
1524+
* @param t1
1525+
* an Observable to be concatenated
1526+
* @param t2
1527+
* an Observable to be concatenated
1528+
* @param t3
1529+
* an Observable to be concatenated
1530+
* @param t4
1531+
* an Observable to be concatenated
1532+
* @return an Observable with the concatenating behavior
1533+
*/
1534+
@Experimental
1535+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4) {
1536+
return concatDelayError(just(t1, t2, t3, t4));
1537+
}
1538+
1539+
/**
1540+
* Returns an Observable that emits the items emitted by five Observables, one after the other, without
1541+
* interleaving them, and delays any errors till all Observables terminate.
1542+
*
1543+
* <dl>
1544+
* <dt><b>Backpressure:</b></dt>
1545+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1546+
* sources are expected to honor backpressure as well.
1547+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1548+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1549+
* <dt><b>Scheduler:</b></dt>
1550+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1551+
* </dl>
1552+
*
1553+
* @param <T> the common element base type
1554+
* @param t1
1555+
* an Observable to be concatenated
1556+
* @param t2
1557+
* an Observable to be concatenated
1558+
* @param t3
1559+
* an Observable to be concatenated
1560+
* @param t4
1561+
* an Observable to be concatenated
1562+
* @param t5
1563+
* an Observable to be concatenated
1564+
* @return an Observable with the concatenating behavior
1565+
*/
1566+
@Experimental
1567+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5) {
1568+
return concatDelayError(just(t1, t2, t3, t4, t5));
1569+
}
1570+
1571+
/**
1572+
* Returns an Observable that emits the items emitted by six Observables, one after the other, without
1573+
* interleaving them, and delays any errors till all Observables terminate.
1574+
*
1575+
* <dl>
1576+
* <dt><b>Backpressure:</b></dt>
1577+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1578+
* sources are expected to honor backpressure as well.
1579+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1580+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1581+
* <dt><b>Scheduler:</b></dt>
1582+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1583+
* </dl>
1584+
*
1585+
* @param <T> the common element base type
1586+
* @param t1
1587+
* an Observable to be concatenated
1588+
* @param t2
1589+
* an Observable to be concatenated
1590+
* @param t3
1591+
* an Observable to be concatenated
1592+
* @param t4
1593+
* an Observable to be concatenated
1594+
* @param t5
1595+
* an Observable to be concatenated
1596+
* @param t6
1597+
* an Observable to be concatenated
1598+
* @return an Observable with the concatenating behavior
1599+
*/
1600+
@Experimental
1601+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6) {
1602+
return concatDelayError(just(t1, t2, t3, t4, t5, t6));
1603+
}
1604+
1605+
/**
1606+
* Returns an Observable that emits the items emitted by seven Observables, one after the other, without
1607+
* interleaving them, and delays any errors till all Observables terminate.
1608+
*
1609+
* <dl>
1610+
* <dt><b>Backpressure:</b></dt>
1611+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1612+
* sources are expected to honor backpressure as well.
1613+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1614+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1615+
* <dt><b>Scheduler:</b></dt>
1616+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1617+
* </dl>
1618+
*
1619+
* @param <T> the common element base type
1620+
* @param t1
1621+
* an Observable to be concatenated
1622+
* @param t2
1623+
* an Observable to be concatenated
1624+
* @param t3
1625+
* an Observable to be concatenated
1626+
* @param t4
1627+
* an Observable to be concatenated
1628+
* @param t5
1629+
* an Observable to be concatenated
1630+
* @param t6
1631+
* an Observable to be concatenated
1632+
* @param t7
1633+
* an Observable to be concatenated
1634+
* @return an Observable with the concatenating behavior
1635+
*/
1636+
@Experimental
1637+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7) {
1638+
return concatDelayError(just(t1, t2, t3, t4, t5, t6, t7));
1639+
}
1640+
1641+
/**
1642+
* Returns an Observable that emits the items emitted by eight Observables, one after the other, without
1643+
* interleaving them, and delays any errors till all Observables terminate.
1644+
*
1645+
* <dl>
1646+
* <dt><b>Backpressure:</b></dt>
1647+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1648+
* sources are expected to honor backpressure as well.
1649+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1650+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1651+
* <dt><b>Scheduler:</b></dt>
1652+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1653+
* </dl>
1654+
*
1655+
* @param <T> the common element base type
1656+
* @param t1
1657+
* an Observable to be concatenated
1658+
* @param t2
1659+
* an Observable to be concatenated
1660+
* @param t3
1661+
* an Observable to be concatenated
1662+
* @param t4
1663+
* an Observable to be concatenated
1664+
* @param t5
1665+
* an Observable to be concatenated
1666+
* @param t6
1667+
* an Observable to be concatenated
1668+
* @param t7
1669+
* an Observable to be concatenated
1670+
* @param t8
1671+
* an Observable to be concatenated
1672+
* @return an Observable with the concatenating behavior
1673+
*/
1674+
@Experimental
1675+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8) {
1676+
return concatDelayError(just(t1, t2, t3, t4, t5, t6, t7, t8));
1677+
}
1678+
1679+
/**
1680+
* Returns an Observable that emits the items emitted by nine Observables, one after the other, without
1681+
* interleaving them, and delays any errors till all Observables terminate.
1682+
*
1683+
* <dl>
1684+
* <dt><b>Backpressure:</b></dt>
1685+
* <dd>The operator honors backpressure from downstream. The {@code Observable}
1686+
* sources are expected to honor backpressure as well.
1687+
* If any of the source {@code Observable}s violate this, it <em>may</em> throw an
1688+
* {@code IllegalStateException} when the source {@code Observable} completes.</dd>
1689+
* <dt><b>Scheduler:</b></dt>
1690+
* <dd>{@code concatDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
1691+
* </dl>
1692+
*
1693+
* @param <T> the common element base type
1694+
* @param t1
1695+
* an Observable to be concatenated
1696+
* @param t2
1697+
* an Observable to be concatenated
1698+
* @param t3
1699+
* an Observable to be concatenated
1700+
* @param t4
1701+
* an Observable to be concatenated
1702+
* @param t5
1703+
* an Observable to be concatenated
1704+
* @param t6
1705+
* an Observable to be concatenated
1706+
* @param t7
1707+
* an Observable to be concatenated
1708+
* @param t8
1709+
* an Observable to be concatenated
1710+
* @param t9
1711+
* an Observable to be concatenated
1712+
* @return an Observable with the concatenating behavior
1713+
*/
1714+
@Experimental
1715+
public static <T> Observable<T> concatDelayError(Observable<? extends T> t1, Observable<? extends T> t2, Observable<? extends T> t3, Observable<? extends T> t4, Observable<? extends T> t5, Observable<? extends T> t6, Observable<? extends T> t7, Observable<? extends T> t8, Observable<? extends T> t9) {
1716+
return concatDelayError(just(t1, t2, t3, t4, t5, t6, t7, t8, t9));
1717+
}
1718+
14551719
/**
14561720
* Returns an Observable that calls an Observable factory to create an Observable for each new Observer
14571721
* that subscribes. That is, for each subscriber, the actual Observable that subscriber observes is

0 commit comments

Comments
 (0)