Returns a predicate that evaluates to {@code true} if its
argument is between {@code low} (inclusive) and {@code high}
(exclusive).
198900
public static <T extends Comparable<T>> Predicate<T> between(
      final T low, final T high) {
    return new Predicate<T>() {
      @Override
      public boolean apply(T obj) {
        return obj != null
            && (low == null || obj.compareTo(low) >= 0)
            && (high == null || obj.compareTo(high) < 0);
      }
    };
  }
230856
public static <T extends Comparable<? super T>> Predicates<T> betweenInclusiveTo(T from, T to)
    {
        Predicates.failIfDifferentTypes(from, to);
        return new BetweenInclusiveTo<T>(from, to);
    }
1097984
public static <T> Predicate<T> contains(final Iterable<T> iterable) {
        return new Predicate<T>() {
            @Override
            public boolean test(final T testValue) {
                return Iterables.contains(iterable, testValue);
            }
        };
    }
189704
def any(self, predicate):
        
        if predicate is None:
            raise NullArgumentError(
                u"predicate lambda expression is necessary")
        return self.where(predicate).count() > 0
847880
public T between(Object low, Object hi) {
        return _withComparisonOperator(ComparisonOperator.BETWEEN)._withValues(low, hi);
    }
141504
public static <T> Predicate<T> and(Predicate<T> first, Predicate<T> second) {
        dbc.precondition(first != null, "first predicate is null");
        dbc.precondition(second != null, "second predicate is null");
        return Logic.Unary.and(Iterations.iterable(first, second));
    }
1210795
private boolean isPresent(CobolOptionalType optionalType) {
        if (optionalType.getDependingOn() != null) {
            return getOdoValue(optionalType.getDependingOn()) > 0;
        }
        return true;
    }
1334223
public static Integer findFree(int lowIncluse, int highInclusive) {
		int low = Math.max(1, Math.min(lowIncluse, highInclusive));
		int high = Math.min(65535, Math.max(lowIncluse, highInclusive));
		Integer result = null;
		int split = RandomUtils.nextInt(low, high + 1);
		for (int port = split; port <= high; port++) {
			if (isFree(port)) {
				result = port;
				break;
			}
		}
		if (result == null) {
			for (int port = low; port < split; port++) {
				if (isFree(port)) {
					result = port;
					break;
				}
			}
		}
		return result;
	}
206667
public static <T, P> T detectWithIfNone(
            Iterable<T> iterable,
            Predicate2<? super T, ? super P> predicate,
            P parameter,
            T ifNone)
    {
        T result = Iterate.detectWith(iterable, predicate, parameter);
        return result == null ? ifNone : result;
    }
67149
public static <T> Predicate<T> predicate(CheckedPredicate<T> predicate) {
        return predicate(predicate, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
288759
public static <T extends Executable> Predicate<T> executableIsSynthetic() {
        return candidate -> candidate != null && candidate.isSynthetic();
    }
1372621
@Override
    public <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> lhs,
            Expression<? extends Y> rhs)
    {
        return new ComparisonPredicate(lhs, rhs, ConditionalOperator.GTE);
    }
838145
public static <T> Predicate<T> OR(final Predicate<T> a, final Predicate<T> b) {
	return new Predicate<T>() {
	    public boolean check(T obj) {
		return a.check(obj) || b.check(obj);
	    }
	};
    }
185703
public static Predicate<Quad> filterWithPrefer(final Prefer prefer) {
        final Set<String> include = new HashSet<>(DEFAULT_REPRESENTATION);
        ofNullable(prefer).ifPresent(p -> {
            p.getOmit().forEach(include::remove);
            p.getInclude().forEach(include::add);
        });
        return quad -> quad.getGraphName().filter(x -> x instanceof IRI).map(x -> (IRI) x)
            .map(IRI::getIRIString).filter(include::contains).isPresent();
    }
192055
public static <T> Predicate<T> in(final Collection<T> c) {
    return new Predicate<T>() {
      @Override
      public boolean apply(T obj) {
        return c.contains(obj);
      }
    };
  }
423505
@Override
    public Predicate lt(Expression<? extends Number> arg0, Number arg1)
    {
        return new ComparisonPredicate(arg0, arg1, ConditionalOperator.LT);
    }
788283
public static <T1, T2> BiPredicate<T1, T2> not(BiPredicate<T1, T2> predicate) {
        dbc.precondition(predicate != null, "cannot negate a null predicate");
        return predicate.negate();
    }