Class NotCriterion<T>
java.lang.Object
com.saperion.common.lang.criterion.NotCriterion<T>
- Type Parameters:
T- type of testable objects
- All Implemented Interfaces:
Criterion<T>
A Criterion that negates an existing Criterion.
Objects satisfy this NotCriterion if and only if they do not satisfy the constituting Criterion.
This implementation is not synchronized. If the constituting criterion can be used by multiple threads concurrently,
this OrCriterion can be used by multiple threads concurrently as well. Else if used by different threads
concurrently, external synchronization is necessary.
- Author:
- agz
-
Constructor Summary
ConstructorsConstructorDescriptionNotCriterion(Criterion<? super T> criterion) Creates a newNotCriterionbased on the specifiedCriterion.NotCriterion(Criterion<? super T> criterion, CriterionIsSatisfiedByNullType criterionIsSatisfiedByNullType) Creates a newNotCriterionbased on the specifiedCriterionwith the specifiedCriterionIsSatisfiedByNullType. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisSatisfiedBy(T object) Returns whether the specified object satisfies this criterion.toString()
-
Constructor Details
-
NotCriterion
public NotCriterion(Criterion<? super T> criterion, CriterionIsSatisfiedByNullType criterionIsSatisfiedByNullType) Creates a newNotCriterionbased on the specifiedCriterionwith the specifiedCriterionIsSatisfiedByNullType. The specifiedCriterionmust not benull. If the specifiedCriterionIsSatisfiedByNullTypeisnullit will default toCriterionIsSatisfiedByNullType.EVALUATE- Parameters:
criterion- underlyingCriterioncriterionIsSatisfiedByNullType-CriterionIsSatisfiedByNullType.EVALUATE
-
NotCriterion
Creates a newNotCriterionbased on the specifiedCriterion. The specifiedCriterionmust not benull. TheCriterionIsSatisfiedByNullTypewill default toCriterionIsSatisfiedByNullType.EVALUATE- Parameters:
criterion- underlyingCriterion
-
-
Method Details
-
isSatisfiedBy
Description copied from interface:CriterionReturns whether the specified object satisfies this criterion. Implementations have to acceptnull-values without throwing exceptions.- Specified by:
isSatisfiedByin interfaceCriterion<T>- Parameters:
object- object to test- Returns:
- whether the specified object satisfies this criterion
-
toString
-