Observable as List.
- created by @Wendly, Mon., Jul. 28, 2014
- exported by @yongjhih, 2016
rx.list.RxList:
List<String> lengthList = new RxList<>(Observable.from(Arrays.asList("Hello", "World!")));
rx.list.MapList:
List<Integer> lengthList = new MapList<String, Integer>(Arrays.asList("Hello", "World!"))
.map(name -> name.length());
rx.list.RxMapList:
List<Integer> lengthList = RxMapList.create(Observable.from(Arrays.asList("Hello", "World!")), obs -> obs.map(name -> name.length()));
rxlist for java project @ jar:
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.yongjhih.RxList:rxlist:-SNAPSHOT' // depends on unofficial yongjhih/jave-util@jar LruCache
compile 'com.github.yongjhih.RxList:rxlist-rxjava:-SNAPSHOT'
}
or, rxlist-android for android project @ aar:
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.yongjhih.RxList:rxlist-android:-SNAPSHOT' // depends on support-v4@aar LruCache
compile 'com.github.yongjhih.RxList:rxlist-android-rxjava:-SNAPSHOT' // depends on support-v4@aar LruCache
}
lazylist.filter(predication);
for (Item i : lazylist) {}; // if (!iter.predication()) iter.next();
Copyright 2015 8tory, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.