Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.block.factory

public abstract Class Predicates<T>

extends Object
implements Predicate<T>
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.block.predicate.Predicate, java.io.Serializable, java.util.function.Predicate
Known Direct Subclasses
org.eclipse.collections.impl.block.factory.Predicates.PredicateAdapter, org.eclipse.collections.impl.block.factory.Predicates.AttributePredicate, org.eclipse.collections.impl.block.factory.Predicates.AnySatisfy, org.eclipse.collections.impl.block.factory.Predicates.AllSatisfy, org.eclipse.collections.impl.block.factory.Predicates.NoneSatisfy, org.eclipse.collections.impl.block.factory.Predicates.CompareToPredicate, org.eclipse.collections.impl.block.factory.Predicates.AbstractIterablePredicate, org.eclipse.collections.impl.block.factory.Predicates.AndPredicate, org.eclipse.collections.impl.block.factory.Predicates.NeitherPredicate, org.eclipse.collections.impl.block.factory.Predicates.OrPredicate, org.eclipse.collections.impl.block.factory.Predicates.NotPredicate, org.eclipse.collections.impl.block.factory.Predicates.EqualPredicate, org.eclipse.collections.impl.block.factory.Predicates.InCollectionPredicate, org.eclipse.collections.impl.block.factory.Predicates.NotInCollectionPredicate, org.eclipse.collections.impl.block.factory.Predicates.InSetIterablePredicate, org.eclipse.collections.impl.block.factory.Predicates.NotInSetIterablePredicate, org.eclipse.collections.impl.block.factory.Predicates.InSetPredicate, org.eclipse.collections.impl.block.factory.Predicates.NotInSetPredicate, org.eclipse.collections.impl.block.factory.Predicates.NotEqualPredicate, org.eclipse.collections.impl.block.factory.Predicates.IsNull, org.eclipse.collections.impl.block.factory.Predicates.NotNull, org.eclipse.collections.impl.block.factory.Predicates.AssignableFromPredicate, org.eclipse.collections.impl.block.factory.Predicates.InstanceOfPredicate, org.eclipse.collections.impl.block.factory.Predicates.NotInstanceOfPredicate, org.eclipse.collections.impl.block.factory.Predicates.AlwaysTrue, org.eclipse.collections.impl.block.factory.Predicates.AlwaysFalse, org.eclipse.collections.impl.block.factory.Predicates.IdentityPredicate, org.eclipse.collections.impl.block.factory.Predicates.NotIdentityPredicate, org.eclipse.collections.impl.block.factory.Predicates.SubclassPredicate, org.eclipse.collections.impl.block.factory.Predicates.SuperclassPredicate, org.eclipse.collections.impl.block.factory.StringPredicates.Empty, org.eclipse.collections.impl.block.factory.StringPredicates.NotEmpty, org.eclipse.collections.impl.block.factory.StringPredicates.HasLetters, org.eclipse.collections.impl.block.factory.StringPredicates.HasDigits, org.eclipse.collections.impl.block.factory.StringPredicates.HasLettersOrDigits, org.eclipse.collections.impl.block.factory.StringPredicates.HasLettersAndDigits, org.eclipse.collections.impl.block.factory.StringPredicates.HasSpaces, org.eclipse.collections.impl.block.factory.StringPredicates.HasUppercase, org.eclipse.collections.impl.block.factory.StringPredicates.HasLowercase, org.eclipse.collections.impl.block.factory.StringPredicates.HasUndefined, org.eclipse.collections.impl.block.factory.StringPredicates.IsNumeric, org.eclipse.collections.impl.block.factory.StringPredicates.IsAlphanumeric, org.eclipse.collections.impl.block.factory.StringPredicates.IsBlank, org.eclipse.collections.impl.block.factory.StringPredicates.NotBlank, org.eclipse.collections.impl.block.factory.StringPredicates.IsAlpha, org.eclipse.collections.impl.block.factory.StringPredicates.ContainsString, org.eclipse.collections.impl.block.factory.StringPredicates.NotContainsString, org.eclipse.collections.impl.block.factory.StringPredicates.ContainsCharacter, org.eclipse.collections.impl.block.factory.StringPredicates.StartsWith, org.eclipse.collections.impl.block.factory.StringPredicates.EndsWith, org.eclipse.collections.impl.block.factory.StringPredicates.Size, org.eclipse.collections.impl.block.factory.StringPredicates.EqualsIgnoreCase, org.eclipse.collections.impl.block.factory.StringPredicates.MatchesRegex, org.eclipse.collections.impl.block.factory.StringPredicates.LessThan, org.eclipse.collections.impl.block.factory.StringPredicates.LessThanOrEqualTo, org.eclipse.collections.impl.block.factory.StringPredicates.GreaterThan, org.eclipse.collections.impl.block.factory.StringPredicates.GreaterThanOrEqualTo, org.eclipse.collections.impl.block.factory.IntegerPredicates.IntegerIsPositive, org.eclipse.collections.impl.block.factory.IntegerPredicates.IntegerIsNegative, org.eclipse.collections.impl.block.factory.IntegerPredicates.IntegerIsZero, org.eclipse.collections.impl.block.factory.IntegerPredicates.IntegerIsOdd, org.eclipse.collections.impl.block.factory.IntegerPredicates.IntegerIsEven, org.eclipse.collections.impl.block.factory.LongPredicates.LongIsOdd, org.eclipse.collections.impl.block.factory.LongPredicates.LongIsEven, org.eclipse.collections.impl.block.factory.LongPredicates.LongIsPositive, org.eclipse.collections.impl.block.factory.LongPredicates.LongIsNegative, org.eclipse.collections.impl.block.factory.LongPredicates.LongIsZero
Imports
java.util.Arrays, .Collection, .Set, org.eclipse.collections.api.block.function.Function, .Function2, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.factory.Sets, org.eclipse.collections.api.set.SetIterable, org.eclipse.collections.impl.block.predicate.checked.CheckedPredicate, .ThrowingPredicate, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.utility.Iterate

The Predicates class can be used to build common Predicates for use in methods such as detect, select and reject which are found on Iterate, MapIterate, and ArrayIterate classes. Predicates supports equals, not equals, less than, greater than, less than or equal to, greater than or equal to, in, not in and, or, and several other Predicate type operations.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
public static class
private static class
private static class
private static class
private static class
public static class
private static class
private static class
protected static class
private static class
private static class
private static class
private static class
private static class
private static class
private abstract static class
private static class
private static class
protected static class
protected static class
private static class
private static class
private static class
private static class
private static class
private static class
protected static class
protected static class
private static class
private static class
public static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
protected abstract static class
Predicates.RangePredicate<T extends Comparable<? super T>>

private static class
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final Predicates<Object>
private static final Predicates<Object>
private static final Predicates<Object>
private static final Predicates<Object>
private static final long
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <T> Predicates<T>
adapt(Predicate<T> predicate)

public static <T> Predicates<Iterable<T>>
allSatisfy(Predicate<? super T> predicate)

public static Predicates<Object>
public static Predicates<Object>
public static <T> Predicates<T>
and(Iterable<? extends Predicate<? super T>> predicates)

public static <T> Predicates<T>
and(Predicate<? super T> predicate1, Predicate<? super T> predicate2)

public static <T> Predicates<T>
and(Predicate<? super T>... predicates)

public Predicates<T>
and(Predicate<? super T> op)

public static <T> Predicates<Iterable<T>>
anySatisfy(Predicate<? super T> predicate)

public static Predicates<Object>
public static <T, V> Predicates<T>
attributeAllSatisfy(Function<? super T, ? extends Iterable<V>> function, Predicate<? super V> predicate)

public static <T, V> Predicates<T>
attributeAnySatisfy(Function<? super T, ? extends Iterable<V>> function, Predicate<? super V> predicate)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeBetweenExclusive(Function<? super T, ? extends V> function, V from, V to)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeBetweenInclusive(Function<? super T, ? extends V> function, V from, V to)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeBetweenInclusiveFrom(Function<? super T, ? extends V> function, V from, V to)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeBetweenInclusiveTo(Function<? super T, ? extends V> function, V from, V to)

public static <T> Predicates<T>
attributeEqual(Function<? super T, ?> function, Object object)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeGreaterThan(Function<? super T, ? extends V> function, V object)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeGreaterThanOrEqualTo(Function<? super T, ? extends V> function, V object)

public static <T> Predicates<T>
attributeIn(Function<? super T, ?> function, Iterable<?> iterable)

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>
attributeIsNull(Function<? super T, ?> function)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeLessThan(Function<? super T, ? extends V> function, V object)

public static <T, V extends Comparable<? super V>> Predicates<T>
attributeLessThanOrEqualTo(Function<? super T, ? extends V> function, V object)

public static <T, V> Predicates<T>
attributeNoneSatisfy(Function<? super T, ? extends Iterable<V>> function, Predicate<? super V> predicate)

public static <T> Predicates<T>
attributeNotEqual(Function<? super T, ?> function, Object object)

public static <T> Predicates<T>
attributeNotIn(Function<? super T, ?> function, Iterable<?> iterable)

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>
attributeNotNull(Function<? super T, ?> function)

public static <T, V> Predicates<T>
attributePredicate(Function<? super T, ? extends V> function, Predicate<? super V> predicate)

public static <T extends Comparable<? super T>> Predicates<T>
betweenExclusive(T from, T 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>
betweenInclusive(T from, T to)

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>
betweenInclusiveFrom(T from, T to)

Creates a predicate which returns true if an object passed to accept method is within the range, inclusive of the from and exclusive from the to value.

public static <T extends Comparable<? super T>> Predicates<T>
betweenInclusiveTo(T from, T 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 <P, T> Predicate<T>
bind(Predicate2<? super T, ? super P> predicate, P parameter)

public static <T> Predicate<T>
cast(Predicate<T> predicate)

Allows a Java 8 lambda or method reference to be used in a method taking a predicate without requiring an actual cast.

public static Predicates<Object>
equal(Object object)

Tests for equality.

private static void
public static <T extends Comparable<? super T>> Predicates<T>
greaterThan(T object)

public static <T extends Comparable<? super T>> Predicates<T>
public static <T> Predicates<T>
ifFalse(Function<? super T, Boolean> function)

public static <T> Predicates<T>
ifTrue(Function<? super T, Boolean> function)

public static Predicates<Object>
in(Iterable<?> iterable)

Creates a predicate which returns true if an object passed to accept method is contained in the iterable.

public static Predicates<Object>
in(Object... array)

public static Predicates<Object>
instanceOf(Class<?> clazz)

public static Predicates<Object>
public static <T extends Comparable<? super T>> Predicates<T>
lessThan(T object)

public static <T extends Comparable<? super T>> Predicates<T>
public static <T> Predicates<T>
neither(Predicate<? super T> operation1, Predicate<? super T> operation2)

public static <T> Predicates<T>
noneOf(Predicate<? super T>... operations)

public static <T> Predicates<T>
noneOf(Iterable<? extends Predicate<? super T>> operations)

public static <T> Predicates<Iterable<T>>
noneSatisfy(Predicate<? super T> predicate)

public static <T> Predicates<T>
not(Predicate<T> predicate)

public Predicates<T>
not()

public static Predicates<Object>
notEqual(Object object)

public static Predicates<Object>
notIn(Iterable<?> iterable)

Creates a predicate which returns true if an object passed to accept method is not contained in the iterable.

public static Predicates<Object>
notIn(Object... array)

public static Predicates<Object>
notInstanceOf(Class<?> clazz)

public static Predicates<Object>
public static Predicates<Object>
notSameAs(Object object)

public static <T> Predicates<T>
or(Iterable<? extends Predicate<? super T>> predicates)

public static <T> Predicates<T>
or(Predicate<? super T> predicate1, Predicate<? super T> predicate2)

public static <T> Predicates<T>
or(Predicate<? super T>... predicates)

public Predicates<T>
or(Predicate<? super T> op)

public static Predicates<Object>
sameAs(Object object)

public static Predicates<Class<?>>
subClass(Class<?> aClass)

public static Predicates<Class<?>>
superClass(Class<?> aClass)

public static <T> Predicate<T>
public static <T> Predicate<T>
throwing(ThrowingPredicate<T> throwingPredicate)

Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Predicate that will throw a RuntimeException, wrapping the checked exception that is the cause.

public static <T> Predicate<T>
throwing(ThrowingPredicate<T> throwingPredicate, Function2<T, ? super Throwable, ? extends RuntimeException> rethrow)

Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Predicate that will throw a user specified RuntimeException based on the provided function.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait