Skip to content

Commit b81528b

Browse files
committed
add RxJava/ dev project
1 parent 389e388 commit b81528b

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed

dev_projects/RxJava/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# RX Java
2+
3+
## Ref
4+
- https://www.youtube.com/watch?v=7mbjhNCWqvs&list=PLZ3FH0lcV0117kiek3g-qiQDkO4ezy_Ro

dev_projects/RxJava/RxJava/pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.yen</groupId>
8+
<artifactId>RxJava</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>11</maven.compiler.source>
13+
<maven.compiler.target>11</maven.compiler.target>
14+
</properties>
15+
16+
<dependencies>
17+
18+
<!--
19+
rxjava
20+
https://mvnrepository.com/artifact/io.reactivex/rxjava
21+
-->
22+
<dependency>
23+
<groupId>io.reactivex</groupId>
24+
<artifactId>rxjava</artifactId>
25+
<version>1.3.8</version>
26+
</dependency>
27+
28+
</dependencies>
29+
30+
</project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.yen;
2+
3+
import rx.Observable;
4+
5+
public class Main {
6+
public static void main(String[] args) {
7+
8+
System.out.println("Hello world!");
9+
10+
/** part 1
11+
*
12+
* https://youtu.be/7mbjhNCWqvs?si=nuGVikk2eSXVRqUE
13+
*/
14+
Observable<String> observable = Observable.create(emitter -> {
15+
emitter.onNext("click on 1");
16+
emitter.onNext("click on 2");
17+
emitter.onNext("click on 3");
18+
});
19+
20+
observable.subscribe(item -> {
21+
System.out.println(item);
22+
}, throwable -> {
23+
System.out.println(throwable.getMessage());
24+
}, () -> {
25+
System.out.println("op complete !");
26+
});
27+
28+
}
29+
30+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.yen.dev;
2+
3+
public class test1 {
4+
public static void main(String[] args) {
5+
System.out.println(123);
6+
}
7+
}

0 commit comments

Comments
 (0)