RxIo from 操作符

from 操作符将数组转换为 RxIo 对象并产生数据流。

代码示例

@Test
public void testRxIoFrom() throws Exception {
    RxIo.from(1, 2, 3)
            .map(new IoFunction<Integer, String>() {
                @Override
                public String call(Integer t) {
                    return "AA:" + t;
                }
            }).subscribe(new IoSubscriber<String>() {
        @Override
        public void onNext(String value) {
            System.out.println(value);
        }

        @Override
        public void onCompleted() {
            System.out.println("execute complete");
        }

        @Override
        public void onError(Throwable e) {
            e.printStackTrace();
        }
    }).start();
}