1. 程式人生 > >RxJava2 Flowable contains(統計操作符)

RxJava2 Flowable contains(統計操作符)

測試程式碼
 @Test
    public void count() {
        System.out.println("######contains#####");
        Single<Long> single = Flowable.just("李曉明", "張寶慶","趙無極").count();
        single.subscribe(new Consumer<Long>() {
            @Override
            public void accept(Long count) throws Exception {
                System.out.println("發射專案總數 count = "
+ count); } }); } 測試結果 ######contains##### 發射專案總數 count = 3