/** * Creates a predicate which returns true if an attribute selected from an object passed to accept method * is contained in the iterable. */ public static <T> Predicates<T> attributeIn( Function<? super T, ?> function, Iterable<?> iterable) { return new AttributePredicate<>(function, Predicates.in(iterable)); }
/** * Tests for equality. */ public static Predicates<Object> equal(Object object) { if (object == null) { return Predicates.isNull(); } return new EqualPredicate(object); }
public static Predicates<Object> notEqual(Object object) { if (object == null) { return Predicates.notNull(); } return new NotEqualPredicate(object); }
public static <T> Predicates<T> attributeNotEqual( Function<? super T, ?> function, Object object) { return new AttributePredicate<>(function, Predicates.notEqual(object)); }
public static <T> Predicates<T> attributeEqual( Function<? super T, ?> function, Object object) { return new AttributePredicate<>(function, Predicates.equal(object)); }
/** * Creates a predicate which returns true if an object passed to accept method is within the range, inclusive * of the from and to values. */ public static <T extends Comparable<? super T>> Predicates<T> betweenInclusive(T from, T to) { Predicates.failIfDifferentTypes(from, to); return new BetweenInclusive<>(from, to); }
public static <T, V extends Comparable<? super V>> Predicates<T> attributeBetweenInclusiveFrom( Function<? super T, ? extends V> function, V from, V to) { return new AttributePredicate<>(function, Predicates.betweenInclusiveFrom(from, to)); }
public static <T, V extends Comparable<? super V>> Predicates<T> attributeBetweenInclusiveTo( Function<? super T, ? extends V> function, V from, V to) { return new AttributePredicate<>(function, Predicates.betweenInclusiveTo(from, to)); }
/** * Creates a predicate which returns true if an object passed to accept method is within the range, exclusive * of the from and to values. */ public static <T extends Comparable<? super T>> Predicates<T> betweenExclusive(T from, T to) { Predicates.failIfDifferentTypes(from, to); return new BetweenExclusive<>(from, to); }
/** * Creates a predicate which returns true if an object passed to accept method is within the range, exclusive * of the from and inclusive of the to value. */ public static <T extends Comparable<? super T>> Predicates<T> betweenInclusiveTo(T from, T to) { Predicates.failIfDifferentTypes(from, to); return new BetweenInclusiveTo<>(from, to); }
/** * Creates a predicate which returns true if an attribute selected from an object passed to accept method * is not contained in the iterable. */ public static <T> Predicates<T> attributeNotIn( Function<? super T, ?> function, Iterable<?> iterable) { return new AttributePredicate<>(function, Predicates.notIn(iterable)); }
public static <T, V extends Comparable<? super V>> Predicates<T> attributeGreaterThanOrEqualTo( Function<? super T, ? extends V> function, V object) { return new AttributePredicate<>(function, new GreaterThanOrEqualPredicate<>(object)); }
public static <T, V extends Comparable<? super V>> Predicates<T> attributeBetweenExclusive( Function<? super T, ? extends V> function, V from, V to) { return new AttributePredicate<>(function, Predicates.betweenExclusive(from, to)); }
public static <T, V extends Comparable<? super V>> Predicates<T> attributeGreaterThan( Function<? super T, ? extends V> function, V object) { return new AttributePredicate<>(function, new GreaterThanPredicate<>(object)); }
/** * Creates a predicate which returns true if an attribute selected from an object passed to accept method * is contained in the iterable. */ public static <T> Predicates<T> attributeIn( Function<? super T, ?> function, Iterable<?> iterable) { return new AttributePredicate<>(function, Predicates.in(iterable)); }
public static <T> Predicates<T> attributeNotEqual( Function<? super T, ?> function, Object object) { return new AttributePredicate<>(function, Predicates.notEqual(object)); }
/** * Tests for equality. */ public static Predicates<Object> equal(Object object) { if (object == null) { return Predicates.isNull(); } return new EqualPredicate(object); }
public static Predicates<Object> notEqual(Object object) { if (object == null) { return Predicates.notNull(); } return new NotEqualPredicate(object); }
/** * Creates a predicate which returns true if an object passed to accept method is within the range, inclusive * of the from and to values. */ public static <T extends Comparable<? super T>> Predicates<T> betweenInclusive(T from, T to) { Predicates.failIfDifferentTypes(from, to); return new BetweenInclusive<>(from, to); }
public static <T, V extends Comparable<? super V>> Predicates<T> attributeBetweenInclusiveFrom( Function<? super T, ? extends V> function, V from, V to) { return new AttributePredicate<>(function, Predicates.betweenInclusiveFrom(from, to)); }