Skip to content

Instantly share code, notes, and snippets.

@rohmanhakim
Created January 4, 2017 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohmanhakim/431ead29ba08712e488ae9172a3d9c98 to your computer and use it in GitHub Desktop.
Save rohmanhakim/431ead29ba08712e488ae9172a3d9c98 to your computer and use it in GitHub Desktop.
Observable<Boolean> invalidFieldsStream = Observable.combineLatest(
emailStream,
passwordStream,
passwordConfirmationStream,
emptyFieldStream, new Func4<Boolean, Boolean, Boolean, Boolean, Boolean>() {
@Override
public Boolean call(Boolean emailInvalid, Boolean passwordInvalid, Boolean passwordConfirmationInvalid, Boolean emptyFieldExist) {
return !emailInvalid && !passwordInvalid && !passwordConfirmationInvalid && !emptyFieldExist;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment