Skip to content

Commit dc50fae

Browse files
committed
Merge remote-tracking branch 'owner/master'
2 parents 12481c4 + 565dd06 commit dc50fae

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

Part 2 - Sequence Basics/1. Creating a sequence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ If you're interested in the results of the `Future` for a limited amount of time
275275
```java
276276
Observable<Integer> values = Observable.from(f, 1000, TimeUnit.MILLISECONDS);
277277
```
278-
If the `Future` has not completed the specified amount of time, the observable will ignore it and fail with a `TimeoutException`.
278+
If the `Future` has not completed in the specified amount of time, the observable will ignore it and fail with a `TimeoutException`.
279279

280280
You can also turn any collection into an observable using the overloads of `Observable.from` that take arrays and iterables. This will result in every item in the collection being emitted and then a final onCompleted event.
281281

Part 2 - Sequence Basics/2. Reducing a sequence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Most of the operators here will be familiar to anyone who has worked with Java's
66

77
### Marble diagrams
88

9-
This is an appropriate time to introduce to concept of marble diagrams. It is a popular way of explaining the operators in Rx, because of their intuitive and graphical nature. They are present a lot in the documentation of RxJava and it only makes sense that we take advantage of their explanatory nature. The format is mostly self-explanatory: time flows left to right, shapes represent values, a slash is a onCompletion, an X is an error. The operator is applied to the top sequence and the result is the sequence below.
9+
This is an appropriate time to introduce to concept of marble diagrams. It is a popular way of explaining the operators in Rx, because of their intuitive and graphical nature. They are present a lot in the documentation of RxJava and it only makes sense that we take advantage of their explanatory nature. The format is mostly self-explanatory: time flows left to right, shapes represent values, a slash is an onCompletion, an X is an error. The operator is applied to the top sequence and the result is the sequence below.
1010

1111
![](https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/legend.png)
1212

Part 3 - Taming the sequence/3. Advanced error handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Advance error handling
1+
# Advanced error handling
22

33
We've already seen how we can handle an error in the observer. However, by that time, we are practically outside of the monad. There can be many kinds of errors and not every error is worth pushing all the way to the top. In standard Java, you can catch an exception at any level and decide if you want to handle it there or throw it further. Similarly in Rx, you can define behaviour based on errors without terminating the observable and forcing the observer to deal with everything.
44

Part 3 - Taming the sequence/6. Hot and Cold observables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Subscription s1 = cold.subscribe(i -> System.out.println("First: " + i));
161161
Thread.sleep(500);
162162
Subscription s2 = cold.subscribe(i -> System.out.println("Second: " + i));
163163
Thread.sleep(500);
164-
System.out.println("Unsubscribe first");
164+
System.out.println("Unsubscribe second");
165165
s2.unsubscribe();
166166
Thread.sleep(500);
167167
System.out.println("Unsubscribe first");
@@ -179,7 +179,7 @@ First: 2
179179
Second: 2
180180
First: 3
181181
Second: 3
182-
Unsubscribe first
182+
Unsubscribe second
183183
First: 4
184184
First: 5
185185
First: 6

Part 3 - Taming the sequence/7. Custom operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
RxJava offers a very large [operator set](http://reactivex.io/RxJava/javadoc/rx/Observable.html). Counting all the overloads, the number of operators on Rx is over 300. A smaller number of those is essential, meaning that you cannot achieve an Rx implementation without them. Many are there just for convenience and a self-descriptive name. For example, if `source.First(user -> user.isOnline())` didn't exist, we would still be able to do `source.filter(user -> user.isOnline()).First()`.
44

5-
Despite many convenience operators, the operator set of RxJava is still very basic. Rx offers the building blocks that you can combine into anything, but eventually you will want to define reuseable code for repeated cases. In standard Java, this would be done with custom classes and methods. In Rx, you would like the ability to design custop operators. For example, calculating a running average from a sequence of numbers may be very common in your financial application. That doesn't already exist in `Observable`, but you can make it yourself:
5+
Despite many convenience operators, the operator set of RxJava is still very basic. Rx offers the building blocks that you can combine into anything, but eventually you will want to define reuseable code for repeated cases. In standard Java, this would be done with custom classes and methods. In Rx, you would like the ability to design custom operators. For example, calculating a running average from a sequence of numbers may be very common in your financial application. That doesn't already exist in `Observable`, but you can make it yourself:
66

77
```java
88
class AverageAcc {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ No experience with either reactive or functional programming is needed to follow
88

99
### Structure
1010

11-
The content of this book is meant to be read from start to finish. It begins with the basics and every subsequent chapter introduces increasingly advanced features and concepts. Sections of the book are intended to be self-containing and to-the-point, so that the book can be referred back to by non-beginners.
11+
The content of this book is meant to be read from start to finish. It is bigger than your average tutorial and smaller than an actual book. It begins with the basics and every subsequent chapter introduces increasingly advanced features and concepts. Sections of the book are intended to be self-containing and to-the-point, so that the book can be referred back to by non-beginners.
1212

1313
The examples used in the book are also [available in compilable java files](/tests/java/itrx) in two formats:
1414
* Examples that print to standard output (recommended for first-time readers)

0 commit comments

Comments
 (0)