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 java.lang.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
Constructors Constructor Description DescribedPredicate(java.lang.String description, java.lang.Object... params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> DescribedPredicate<java.lang.Iterable<T>>
allElements(DescribedPredicate<? super T> predicate)
static <T> DescribedPredicate<T>
alwaysFalse()
static <T> DescribedPredicate<T>
alwaysTrue()
DescribedPredicate<T>
and(DescribedPredicate<? super T> other)
static <T> DescribedPredicate<java.lang.Iterable<T>>
anyElementThat(DescribedPredicate<? super T> predicate)
DescribedPredicate<T>
as(java.lang.String description, java.lang.Object... params)
static <T> DescribedPredicate<T>
describe(java.lang.String description, Predicate<? super T> predicate)
static <T> DescribedPredicate<T>
doesNot(DescribedPredicate<? super T> predicate)
static <T> DescribedPredicate<T>
doesnt(DescribedPredicate<? super T> predicate)
Deprecated.Decided to consistently never use contractions -> usedoesNot(DescribedPredicate)
static <T> DescribedPredicate<T>
doNot(DescribedPredicate<? super T> predicate)
static <T> DescribedPredicate<T>
dont(DescribedPredicate<? super T> predicate)
Deprecated.Decided to consistently never use contractions -> usedoNot(DescribedPredicate)
static <T> DescribedPredicate<T>
equalTo(T object)
<U extends T>
DescribedPredicate<U>forSubType()
Workaround for the limitations of the Java type system->
Can't specify this contravariant type at the language leveljava.lang.String
getDescription()
static <T extends java.lang.Comparable<T>>
DescribedPredicate<T>greaterThan(T value)
static <T extends java.lang.Comparable<T>>
DescribedPredicate<T>greaterThanOrEqualTo(T value)
static <T extends java.lang.Comparable<T>>
DescribedPredicate<T>lessThan(T value)
static <T extends java.lang.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)
DescribedPredicate<T>
or(DescribedPredicate<? super T> other)
java.lang.String
toString()
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
-
as
public DescribedPredicate<T> as(java.lang.String description, java.lang.Object... params)
-
and
public DescribedPredicate<T> and(DescribedPredicate<? super T> other)
-
or
public DescribedPredicate<T> or(DescribedPredicate<? super T> other)
-
onResultOf
public <F> DescribedPredicate<F> onResultOf(Function<? super F,? extends T> function)
-
forSubType
public <U extends T> DescribedPredicate<U> forSubType()
Workaround for the limitations of the Java type system->
Can't specify this contravariant type at the language level
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
alwaysTrue
public static <T> DescribedPredicate<T> alwaysTrue()
-
alwaysFalse
public static <T> DescribedPredicate<T> alwaysFalse()
-
equalTo
public static <T> DescribedPredicate<T> equalTo(T object)
-
lessThan
public static <T extends java.lang.Comparable<T>> DescribedPredicate<T> lessThan(T value)
-
greaterThan
public static <T extends java.lang.Comparable<T>> DescribedPredicate<T> greaterThan(T value)
-
lessThanOrEqualTo
public static <T extends java.lang.Comparable<T>> DescribedPredicate<T> lessThanOrEqualTo(T value)
-
greaterThanOrEqualTo
public static <T extends java.lang.Comparable<T>> DescribedPredicate<T> greaterThanOrEqualTo(T value)
-
describe
public static <T> DescribedPredicate<T> describe(java.lang.String description, Predicate<? super T> predicate)
-
doesnt
@Deprecated public static <T> DescribedPredicate<T> doesnt(DescribedPredicate<? super T> predicate)
Deprecated.Decided to consistently never use contractions -> usedoesNot(DescribedPredicate)
-
dont
@Deprecated public static <T> DescribedPredicate<T> dont(DescribedPredicate<? super T> predicate)
Deprecated.Decided to consistently never use contractions -> usedoNot(DescribedPredicate)
-
doesNot
public static <T> DescribedPredicate<T> doesNot(DescribedPredicate<? super T> predicate)
-
doNot
public static <T> DescribedPredicate<T> doNot(DescribedPredicate<? super T> predicate)
-
not
public static <T> DescribedPredicate<T> not(DescribedPredicate<? super T> predicate)
-
anyElementThat
public static <T> DescribedPredicate<java.lang.Iterable<T>> anyElementThat(DescribedPredicate<? super T> predicate)
-
allElements
public static <T> DescribedPredicate<java.lang.Iterable<T>> allElements(DescribedPredicate<? super T> predicate)
-
-