Skip to content

Instantly share code, notes, and snippets.

@murki
Last active March 2, 2016 18:46
Show Gist options
  • Save murki/c142e28dbc2c7488a391 to your computer and use it in GitHub Desktop.
Save murki/c142e28dbc2c7488a391 to your computer and use it in GitHub Desktop.
// We assume the repositories getData() methods will return null if no data is available
// DomainService.java
@RxLogObservable
public Observable<Data> getData() {
return getMergedData()
.filter(
new Func1<Data, Boolean>() {
@Override
public Boolean call(Data data) {
return data != null;
}
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment