add: file sorting

This commit is contained in:
hyb1996
2017-09-30 19:12:07 +08:00
parent c114148502
commit be022f1c94
15 changed files with 532 additions and 212 deletions

View File

@@ -2,6 +2,15 @@ package com.stardust.scriptdroid;
import org.junit.Test;
import java.util.concurrent.Callable;
import io.reactivex.Observable;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
/**
* Example local unit test, which will execute on the development machine (host).
*
@@ -17,11 +26,33 @@ public class ExampleUnitTest {
// TODO: 2017/7/4 细节 三天 7.18
// TODO: 2017/7/4 写文档 两天 7.20
// TODO: 2017/7/4 发布 3.0.0 Beta 7.22
// TODO: 2017/9/30 想象真是美好。
@Test
public void test() {
System.out.println("SOS".hashCode());
Observable.fromCallable(new Callable<String>() {
@Override
public String call() throws Exception {
System.out.println(Thread.currentThread());
return "";
}
})
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.newThread())
.doOnComplete(new Action() {
@Override
public void run() throws Exception {
System.out.println(Thread.currentThread());
}
})
.observeOn(Schedulers.newThread())
.subscribe(new Consumer<String>() {
@Override
public void accept(@NonNull String s) throws Exception {
System.out.println(Thread.currentThread());
}
});
}
@Test