Package com.tngtech.archunit.base
Class DescribedPredicate<T>
java.lang.Object
com.tngtech.archunit.base.DescribedPredicate<T>
- Type Parameters:
T
- The type of objects the predicate applies to
- All Implemented Interfaces:
Predicate<T>
- Direct Known Subclasses:
PackageMatchers
@PublicAPI(usage=INHERITANCE)
public abstract class DescribedPredicate<T>
extends Object
implements Predicate<T>
A predicate holding a description.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tngtech.archunit.base.Predicate
Predicate.Defaults
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> DescribedPredicate<Iterable<T>>
allElements
(DescribedPredicate<? super T> predicate) static <T> DescribedPredicate<T>
static <T> DescribedPredicate<T>
and
(DescribedPredicate<? super T> other) static <T> DescribedPredicate<Iterable<? extends T>>
anyElementThat
(DescribedPredicate<? super T> predicate) static <T> DescribedPredicate<T>
static <T> DescribedPredicate<T>
doesNot
(DescribedPredicate<? super T> predicate) static <T> DescribedPredicate<T>
doNot
(DescribedPredicate<? super T> predicate) static DescribedPredicate<Iterable<?>>
empty()
static <T> DescribedPredicate<T>
equalTo
(T object) final <U extends T>
DescribedPredicate<U>Workaround for the limitations of the Java type system->
Can't specify this contravariant type at the language levelstatic <T extends Comparable<T>>
DescribedPredicate<T>greaterThan
(T value) static <T extends Comparable<T>>
DescribedPredicate<T>greaterThanOrEqualTo
(T value) static <T extends Comparable<T>>
DescribedPredicate<T>lessThan
(T value) static <T extends Comparable<T>>
DescribedPredicate<T>lessThanOrEqualTo
(T value) static <T> DescribedPredicate<T>
not
(DescribedPredicate<? super T> predicate) <F> DescribedPredicate<F>
onResultOf
(Function<? super F, ? extends T> function) static <T> DescribedPredicate<Optional<T>>
optionalContains
(DescribedPredicate<? super T> predicate) static <T> DescribedPredicate<Optional<T>>
or
(DescribedPredicate<? super T> other) toString()
-
Constructor Details
-
DescribedPredicate
-
-
Method Details
-
getDescription
-
as
-
and
-
or
-
onResultOf
-
forSubtype
Workaround for the limitations of the Java type system->
Can't specify this contravariant type at the language level -
toString
-
alwaysTrue
-
alwaysFalse
-
equalTo
-
lessThan
-
greaterThan
-
lessThanOrEqualTo
-
greaterThanOrEqualTo
-
describe
public static <T> DescribedPredicate<T> describe(String description, Predicate<? super T> predicate) -
doesNot
-
doNot
-
not
-
empty
-
optionalContains
public static <T> DescribedPredicate<Optional<T>> optionalContains(DescribedPredicate<? super T> predicate) -
optionalEmpty
-
anyElementThat
public static <T> DescribedPredicate<Iterable<? extends T>> anyElementThat(DescribedPredicate<? super T> predicate) -
allElements
public static <T> DescribedPredicate<Iterable<T>> allElements(DescribedPredicate<? super T> predicate)
-