RxJava2-Java6
RxJava2-Java6 copied to clipboard
BlockingObservable and NbpBlockingObservable use Optional.stream()
While the implementation could probably be changed upstream as the steam is just convenience, this needs reconciled either way.
Another fix would just be to implement a subset of the stream API in the runtime. Then we don't have to rewrite anything...
Each
public Optional<T> firstOption() {
return this.stream().findFirst();
}
Needs rewritten to
public Optional<T> firstOption() {
return Iterables.firstOption(this);
}
Where Iterables.firstOption is a util class in our runtime.
Each
public Optional<T> lastOption() {
return this.stream().reduce((a, b) -> {
return b;
});
}
Needs rewritten to
public Optional<T> lastOption() {
return Iterables.lastOption(this);
}
Where Iterables.lastOption is a util class in our runtime.