Java Code Examples for io.reactivex.Flowable#rangeLong()
The following examples show how to use
io.reactivex.Flowable#rangeLong() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DemoDefaultSubscriber.java From Reactive-Programming-With-Java-9 with MIT License | 5 votes |
public static void main(String[] args) { // TODO Auto-generated method stub Flowable< Long> flowable=Flowable.rangeLong(2, 12); flowable.subscribe(new DefaultSubscriber<Long>() { @Override public void onComplete() { // TODO Auto-generated method stub System.out.println("Its Done!!!"); } @Override public void onError(Throwable throwable) { // TODO Auto-generated method stub throwable.printStackTrace(); } @Override public void onNext(Long value) { // TODO Auto-generated method stub if(value==4) cancel(); System.out.println("value:-" + value); } @Override protected void onStart() { // TODO Auto-generated method stub request(5); } }); }
Example 2
Source File: FlowableFetchPagesByRequestTest.java From rxjava2-extras with Apache License 2.0 | 4 votes |
@Override public Flowable<Long> apply(Long start, Long request) { return Flowable.rangeLong(start, request); }
Example 3
Source File: FlowableFetchPagesByRequestTest.java From rxjava2-extras with Apache License 2.0 | 4 votes |
@Override public Flowable<Long> apply(Long start, Long request) { return Flowable.rangeLong(start, request - 1); }
Example 4
Source File: FlowableFetchPagesByRequestTest.java From rxjava2-extras with Apache License 2.0 | 4 votes |
@Override public Flowable<Long> apply(Long start, Long request) { return Flowable.rangeLong(start, request + 1); }