1298 |
|
static final class BiRun<T,U> extends BiCompletion<T,U,Void> { |
1299 |
|
Runnable fn; |
1300 |
|
BiRun(Executor executor, CompletableFuture<Void> dep, |
1301 |
< |
CompletableFuture<T> src, |
1302 |
< |
CompletableFuture<U> snd, |
1301 |
> |
CompletableFuture<T> src, CompletableFuture<U> snd, |
1302 |
|
Runnable fn) { |
1303 |
|
super(executor, dep, src, snd); this.fn = fn; |
1304 |
|
} |
1360 |
|
@SuppressWarnings("serial") |
1361 |
|
static final class BiRelay<T,U> extends BiCompletion<T,U,Void> { // for And |
1362 |
|
BiRelay(CompletableFuture<Void> dep, |
1363 |
< |
CompletableFuture<T> src, |
1365 |
< |
CompletableFuture<U> snd) { |
1363 |
> |
CompletableFuture<T> src, CompletableFuture<U> snd) { |
1364 |
|
super(null, dep, src, snd); |
1365 |
|
} |
1366 |
|
final CompletableFuture<Void> tryFire(int mode) { |
1438 |
|
static final class OrApply<T,U extends T,V> extends BiCompletion<T,U,V> { |
1439 |
|
Function<? super T,? extends V> fn; |
1440 |
|
OrApply(Executor executor, CompletableFuture<V> dep, |
1441 |
< |
CompletableFuture<T> src, |
1444 |
< |
CompletableFuture<U> snd, |
1441 |
> |
CompletableFuture<T> src, CompletableFuture<U> snd, |
1442 |
|
Function<? super T,? extends V> fn) { |
1443 |
|
super(executor, dep, src, snd); this.fn = fn; |
1444 |
|
} |
1493 |
|
static final class OrAccept<T,U extends T> extends BiCompletion<T,U,Void> { |
1494 |
|
Consumer<? super T> fn; |
1495 |
|
OrAccept(Executor executor, CompletableFuture<Void> dep, |
1496 |
< |
CompletableFuture<T> src, |
1500 |
< |
CompletableFuture<U> snd, |
1496 |
> |
CompletableFuture<T> src, CompletableFuture<U> snd, |
1497 |
|
Consumer<? super T> fn) { |
1498 |
|
super(executor, dep, src, snd); this.fn = fn; |
1499 |
|
} |
1549 |
|
static final class OrRun<T,U> extends BiCompletion<T,U,Void> { |
1550 |
|
Runnable fn; |
1551 |
|
OrRun(Executor executor, CompletableFuture<Void> dep, |
1552 |
< |
CompletableFuture<T> src, |
1557 |
< |
CompletableFuture<U> snd, |
1552 |
> |
CompletableFuture<T> src, CompletableFuture<U> snd, |
1553 |
|
Runnable fn) { |
1554 |
|
super(executor, dep, src, snd); this.fn = fn; |
1555 |
|
} |
1600 |
|
|
1601 |
|
@SuppressWarnings("serial") |
1602 |
|
static final class OrRelay<T,U> extends BiCompletion<T,U,Object> { // for Or |
1603 |
< |
OrRelay(CompletableFuture<Object> dep, CompletableFuture<T> src, |
1604 |
< |
CompletableFuture<U> snd) { |
1603 |
> |
OrRelay(CompletableFuture<Object> dep, |
1604 |
> |
CompletableFuture<T> src, CompletableFuture<U> snd) { |
1605 |
|
super(null, dep, src, snd); |
1606 |
|
} |
1607 |
|
final CompletableFuture<Object> tryFire(int mode) { |