Skip to content

Commit d165ade

Browse files
authored
Update 2. Key types.md
1 parent 2923519 commit d165ade

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Part 1 - Getting Started/2. Key types.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ public static void main(String[] args) {
8080

8181
예제를 보면 값이 전달되어 질 때 subscribe가 없기 때문에 `1`이 출력되지 않았습니다. subscribe를 등록 한 후에 subject에 전달된 값을 출력 하기 시작했습니다.
8282

83-
This is the first time we see `subscribe` being used, so it is worth paying attention to how it was used. In this case, we used the overload which expects one [Function](http://reactivex.io/RxJava/javadoc/rx/functions/Function.html) for the case of onNext. That function takes an argument of type `Integer` and returns nothing. Functions without a return type are also called actions. We can provide that function in different ways:
84-
* we can supply an instance of `Action1<Integer>`,
85-
* implicitly create one using a [lambda expression](http://en.wikipedia.org/wiki/Anonymous_function#Java) or
86-
* pass a reference to an existing method that fits the signature.
87-
In this case, `System.out::println` has an overload that accepts `Object`, so we passed a reference to it. `subscribe` will call `println` with the arriving values as the argument.
83+
우리는 `subscribe`가 사용되는 것을 처음보았기 때문에 이것이 어떻게 사용되었는지를 주목해야합니다. 우리는 onNext의 경우에 대해 하나의 [Function](http://reactivex.io/RxJava/javadoc/rx/functions/Function.html)를 사용했습니다. 이 함수는 `Integer` 형의 인수를 취하고 아무것도 반환하지 않습니다. 반환 유형이 없는 함수를 action이라고도 합니다. 우리는 그 기능을 다른 방법으로 제공 할 수 있습니다.
84+
* `Action1<Integer>`의 인스턴스를 제공.
85+
* [람다 식](http://en.wikipedia.org/wiki/Anonymous_function#Java)을 사용하여 암시적으로 만듬
86+
* 매개변수에 맞는 기존 메소드에 대한 참조를 전달. 위 예제에서 `System.out::println``Object`를 받아드리는 오버로드를 가지고 있기 때문에 그것에 대한 참조를 전달. `subscribe`는 전달되는 값을 인수로 하여 `println`을 호출.
8887

8988
### ReplaySubject
9089

0 commit comments

Comments
 (0)