rx.util.functions.Functions.alwaysTrue-s



API Populatity

2 Client projects

Project: rx

Package: rx.util

Project Netflix/RxJava in file ...-core.src.main.java.rx.operators.OperationAny.java (2013-11-04)
@@ -15,16 +15,16 @@
  */
 package rx.operators;
 
+import static rx.util.functions.Functions.*;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
 import rx.Observable;
 import rx.Observable.OnSubscribeFunc;
 import rx.Observer;
 import rx.Subscription;
 import rx.util.functions.Func1;
 
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static rx.util.functions.Functions.alwaysTrue;
-
 /**
  * Returns an {@link Observable} that emits <code>true</code> if any element of
  * an observable sequence satisfies a condition, otherwise <code>false</code>.
@@ -41,7 +41,7 @@ public final class OperationAny {
     public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source) {
         return new Any<T>(source, alwaysTrue(), false);
     }
-    
+
     public static <T> OnSubscribeFunc<Boolean> isEmpty(Observable<? extends T> source) {
         return new Any<T>(source, alwaysTrue(), true);
     }
@@ -61,7 +61,7 @@ public final class OperationAny {
     public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source, Func1<? super T, Boolean> predicate) {
         return new Any<T>(source, predicate, false);
     }
-    
+
     public static <T> OnSubscribeFunc<Boolean> exists(Observable<? extends T> source, Func1<? super T, Boolean> predicate) {
         return any(source, predicate);
     }
Project ReactiveX/RxJava in file ...-core.src.main.java.rx.operators.OperationAny.java (2013-11-04)
@@ -15,16 +15,16 @@
  */
 package rx.operators;
 
+import static rx.util.functions.Functions.*;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
 import rx.Observable;
 import rx.Observable.OnSubscribeFunc;
 import rx.Observer;
 import rx.Subscription;
 import rx.util.functions.Func1;
 
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static rx.util.functions.Functions.alwaysTrue;
-
 /**
  * Returns an {@link Observable} that emits <code>true</code> if any element of
  * an observable sequence satisfies a condition, otherwise <code>false</code>.
@@ -41,7 +41,7 @@ public final class OperationAny {
     public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source) {
         return new Any<T>(source, alwaysTrue(), false);
     }
-    
+
     public static <T> OnSubscribeFunc<Boolean> isEmpty(Observable<? extends T> source) {
         return new Any<T>(source, alwaysTrue(), true);
     }
@@ -61,7 +61,7 @@ public final class OperationAny {
     public static <T> OnSubscribeFunc<Boolean> any(Observable<? extends T> source, Func1<? super T, Boolean> predicate) {
         return new Any<T>(source, predicate, false);
     }
-    
+
     public static <T> OnSubscribeFunc<Boolean> exists(Observable<? extends T> source, Func1<? super T, Boolean> predicate) {
         return any(source, predicate);
     }
Project Netflix/RxJava in file ...ain.java.rx.operators.OperationFirstOrDefault.java (2013-11-04)
@@ -15,6 +15,10 @@
  */
 package rx.operators;
 
+import static rx.util.functions.Functions.*;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
 import rx.Observable;
 import rx.Observable.OnSubscribeFunc;
 import rx.Observer;
@@ -23,10 +27,6 @@ import rx.subscriptions.Subscriptions;
 import rx.util.functions.Action0;
 import rx.util.functions.Func1;
 
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static rx.util.functions.Functions.alwaysTrue;
-
 /**
  * Returns an Observable that emits the first item emitted by the source
  * Observable, or a default value if the source emits nothing.
@@ -35,7 +35,7 @@ public final class OperationFirstOrDefault {
 
     /**
      * Returns an Observable that emits the first item emitted by the source
-     * Observable that satisfies the given condition, 
+     * Observable that satisfies the given condition,
      * or a default value if the source emits no items that satisfy the given condition.
      * 
      * @param source
@@ -49,7 +49,7 @@ public final class OperationFirstOrDefault {
     public static <T> OnSubscribeFunc<T> firstOrDefault(Observable<? extends T> source, Func1<? super T, Boolean> predicate, T defaultValue) {
         return new FirstOrElse<T>(source, predicate, defaultValue);
     }
-    
+
     /**
      * Returns an Observable that emits the first item emitted by the source
      * Observable, or a default value if the source emits nothing.
@@ -79,7 +79,7 @@ public final class OperationFirstOrDefault {
         public Subscription onSubscribe(final Observer<? super T> observer) {
             final Subscription sourceSub = source.subscribe(new Observer<T>() {
                 private final AtomicBoolean hasEmitted = new AtomicBoolean(false);
-                
+
                 @Override
                 public void onCompleted() {
                     if (!hasEmitted.get()) {
@@ -107,7 +107,7 @@ public final class OperationFirstOrDefault {
                     }
                 }
             });
-            
+
             return Subscriptions.create(new Action0() {
                 @Override
                 public void call() {