Skip to content

Commit 3b401d4

Browse files
committed
Typos
1 parent 7bd036f commit 3b401d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Observable.range(0,10)
8484
.subscribe();
8585
```
8686

87-
Many languages have ways of supporting this. Inconveniently, Java doesn't. You'd have to edit `Observable` iteself to add your own methods. There's no point asking for it either, since the RxJava team are conservative about adding yet another operator. You could `extend` `Observable` and add your own operators there. In that case, as soon as you call any of the old operators, you're going to get a vanilla `Observable` back and lose access to the operators that you built.
87+
Many languages have ways of supporting this. Inconveniently, Java doesn't. You'd have to edit `Observable` itself to add your own methods. There's no point asking for it either, since the RxJava team are conservative about adding yet another operator. You could `extend` `Observable` and add your own operators there. In that case, as soon as you call any of the old operators, you're going to get a vanilla `Observable` back and lose access to the operators that you built.
8888

8989
### compose
9090

@@ -102,7 +102,7 @@ Observable.just(3, 5, 6, 4, 4)
102102
.subscribe(System.out::println);
103103
```
104104

105-
Java doesn't let you reference a function by its name alone, so here we assumed the custom operator is in our Main class. We can see that now our operator fits perfecty into the chain, albeit with the boilderplate of calling `compose` first. For even better encapsulation, you should implement `Observable.Transformer` in a new class and move the whole thing out of sight, along with its helper class(es).
105+
Java doesn't let you reference a function by its name alone, so here we assumed the custom operator is in our Main class. We can see that now our operator fits perfecty into the chain, albeit with the boilerplate of calling `compose` first. For even better encapsulation, you should implement `Observable.Transformer` in a new class and move the whole thing out of sight, along with its helper class(es).
106106

107107
```java
108108
public class RunningAverage implements Observable.Transformer<Integer, Double> {

0 commit comments

Comments
 (0)