// Path: agera/src/main/java/com/google/android/agera/Common.java
// static final StaticCondicate FALSE_CONDICATE = new StaticCondicate(false);
// 
// Path: agera/src/main/java/com/google/android/agera/Common.java
// static final StaticCondicate TRUE_CONDICATE = new StaticCondicate(true);


import static com.google.android.agera.Common.FALSE_CONDICATE;
import static com.google.android.agera.Common.TRUE_CONDICATE;
import static com.google.android.agera.Preconditions.checkNotNull;
import android.support.annotation.NonNull;
  @NonNull
  public static Condition all(@NonNull final Condition... conditions) {
    return composite(conditions, trueCondition(), falseCondition());
  }

  /**
   * Returns a {@link Condition} from a {@link Predicate} and a {@link Supplier}.
   *
   * <p>When applied the {@link Supplier} return value will be provided to the {@link Predicate} and
   * the result will be returned.
   * If {@link Predicates#truePredicate} or {@link Predicates#falsePredicate} is passed,
   * {@code supplier} will never be called.
   */
  @NonNull
  public static <T> Condition predicateAsCondition(@NonNull final Predicate<T> predicate,
      @NonNull final Supplier<? extends T> supplier) {
    if (predicate == TRUE_CONDICATE) {
      return TRUE_CONDICATE;
    }
    if (predicate == FALSE_CONDICATE) {
      return FALSE_CONDICATE;
    }
    return new PredicateCondition<>(predicate, supplier);
  }

  @NonNull
  private static Condition composite(@NonNull final Condition[] conditions,
      @NonNull final Condition defaultCondition, @NonNull final Condition definingCondition) {
    int nonDefaultCount = 0;
    Condition lastNonDefaultCondition = null;
// Path: agera/src/main/java/com/google/android/agera/Common.java
// static final StaticCondicate FALSE_CONDICATE = new StaticCondicate(false);
// 
// Path: agera/src/main/java/com/google/android/agera/Common.java
// static final StaticCondicate TRUE_CONDICATE = new StaticCondicate(true);


// Path: agera/src/main/java/com/google/android/agera/Conditions.java
import static com.google.android.agera.Common.FALSE_CONDICATE;
import static com.google.android.agera.Common.TRUE_CONDICATE;
import static com.google.android.agera.Preconditions.checkNotNull;
import android.support.annotation.NonNull;

  @NonNull
  public static Condition all(@NonNull final Condition... conditions) {
    return composite(conditions, trueCondition(), falseCondition());
  }

  /**
   * Returns a {@link Condition} from a {@link Predicate} and a {@link Supplier}.
   *
   * <p>When applied the {@link Supplier} return value will be provided to the {@link Predicate} and
   * the result will be returned.
   * If {@link Predicates#truePredicate} or {@link Predicates#falsePredicate} is passed,
   * {@code supplier} will never be called.
   */
  @NonNull
  public static <T> Condition predicateAsCondition(@NonNull final Predicate<T> predicate,
      @NonNull final Supplier<? extends T> supplier) {
    if (predicate == TRUE_CONDICATE) {
      return TRUE_CONDICATE;
    }
    if (predicate == FALSE_CONDICATE) {
      return FALSE_CONDICATE;
    }
    return new PredicateCondition<>(predicate, supplier);
  }

  @NonNull
  private static Condition composite(@NonNull final Condition[] conditions,
      @NonNull final Condition defaultCondition, @NonNull final Condition definingCondition) {
    int nonDefaultCount = 0;
    Condition lastNonDefaultCondition = null;
    for (final Condition condition : conditions) {