Skip to content

Instantly share code, notes, and snippets.

@andych008
andych008 / entity可用性常规则检查
Last active Jul 15, 2016
entity可用性常规则检查
View entity可用性常规则检查
/**
* entity可用性常规则检查
*/
@SuppressWarnings("unchecked")
public static <T> Observable.Transformer<BaseEntity<T>, T> check() {
return new Observable.Transformer<BaseEntity<T>, T>() {
@Override
public Observable<T> call(Observable<BaseEntity<T>> observable) {
return observable.flatMap(new Func1<BaseEntity<T>, Observable<T>>() {
@Override
View 1显示并隐藏loading.java
/**
* 显示并隐藏loading
*/
@SuppressWarnings("unchecked")
public static <T> Observable.Transformer<T, T> showLoading(final ILoading loading) {
return new Observable.Transformer<T, T>() {
@Override
public Observable<T> call(Observable<T> observable) {
return observable
.doOnSubscribe(new Action0() {
@staltz
staltz / introrx.md
Last active Aug 8, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
You can’t perform that action at this time.