Skip to content

Commit cb96d7d

Browse files
committed
Add 'any' operator to Observable
1 parent e257ad3 commit cb96d7d

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4188,36 +4188,36 @@ private boolean isInternalImplementation(Object o) {
41884188
return p != null && p.getName().startsWith("rx.operators");
41894189
}
41904190

4191-
// /**
4192-
// * Returns an {@link Observable} that emits <code>true</code> if the source
4193-
// * {@link Observable} is not empty, otherwise <code>false</code>.
4194-
// *
4195-
// * @param source
4196-
// * The source {@link Observable} to check if not empty.
4197-
// * @return A subscription function for creating the target Observable.
4198-
// * @see <a href=
4199-
// * "http://msdn.microsoft.com/en-us/library/hh229905(v=vs.103).aspx"
4200-
// * >MSDN: Observable.Any</a>
4201-
// */
4202-
// public Observable<Boolean> any() {
4203-
// return create(OperationAny.any(this));
4204-
// }
4205-
//
4206-
// /**
4207-
// * Returns an {@link Observable} that emits <code>true</code> if all items
4208-
// * of the source {@link Observable} satisfy the given condition, otherwise
4209-
// * <code>false</code>.
4210-
// *
4211-
// * @param predicate
4212-
// * The condition all items have to satisfy.
4213-
// * @return A subscription function for creating the target Observable.
4214-
// *
4215-
// * @see <a href=
4216-
// * "http://msdn.microsoft.com/en-us/library/hh211993(v=vs.103).aspx"
4217-
// * >MSDN: Observable.Any</a>
4218-
// */
4219-
// public Observable<Boolean> any(Func1<? super T, Boolean> predicate) {
4220-
// return create(OperationAny.any(this, predicate));
4221-
// }
4191+
/**
4192+
* Returns an {@link Observable} that emits <code>true</code> if the source
4193+
* {@link Observable} is not empty, otherwise <code>false</code>.
4194+
*
4195+
* @param source
4196+
* The source {@link Observable} to check if not empty.
4197+
* @return A subscription function for creating the target Observable.
4198+
* @see <a href=
4199+
* "http://msdn.microsoft.com/en-us/library/hh229905(v=vs.103).aspx"
4200+
* >MSDN: Observable.Any</a>
4201+
*/
4202+
public Observable<Boolean> any() {
4203+
return create(OperationAny.any(this));
4204+
}
4205+
4206+
/**
4207+
* Returns an {@link Observable} that emits <code>true</code> if all items
4208+
* of the source {@link Observable} satisfy the given condition, otherwise
4209+
* <code>false</code>.
4210+
*
4211+
* @param predicate
4212+
* The condition all items have to satisfy.
4213+
* @return A subscription function for creating the target Observable.
4214+
*
4215+
* @see <a href=
4216+
* "http://msdn.microsoft.com/en-us/library/hh211993(v=vs.103).aspx"
4217+
* >MSDN: Observable.Any</a>
4218+
*/
4219+
public Observable<Boolean> any(Func1<? super T, Boolean> predicate) {
4220+
return create(OperationAny.any(this, predicate));
4221+
}
42224222

42234223
}

0 commit comments

Comments
 (0)