public interface GivenConjunction<OBJECTS>
Modifier and Type | Method and Description |
---|---|
GivenConjunction<OBJECTS> |
and(DescribedPredicate<? super OBJECTS> predicate)
Combines the current predicate (e.g.
|
GivenConjunction<OBJECTS> |
or(DescribedPredicate<? super OBJECTS> predicate)
Combines the current predicate (e.g.
|
ArchRule |
should(ArchCondition<OBJECTS> condition) |
ArchRule should(ArchCondition<OBJECTS> condition)
GivenConjunction<OBJECTS> and(DescribedPredicate<? super OBJECTS> predicate)
simpleName
== 'SomeClass') with
another predicate (e.g. resideInAPackage
'foo.bar')
using AND (i.e. both predicates must be satisfied).
NOTE: and(DescribedPredicate)
and or(DescribedPredicate)
combine predicates in the
sequence they are declared, without any "operator precedence". I.e.
all(objects()).that(predicateA).or(predicateB).and(predicateC)...
will filter on predicate (predicateA || predicateB) && predicateC, and
all(objects()).that(predicateA).and(predicateB).or(predicateC)...
will filter on predicate (predicateA && predicateB) || predicateC. If you need more control over the
precedence, how predicates are joined, you have to join these predicates separately, i.e.
all(objects()).that(predicateA.or(predicateB.and(predicateC)))...
predicate
- The predicate to be ANDed on the current object filter predicateGivenConjunction<OBJECTS> or(DescribedPredicate<? super OBJECTS> predicate)
simpleName
== 'SomeClass')
with another predicate (e.g. resideInAPackage
'foo.bar')
using OR (i.e. at least one of the predicates must be satisfied).
NOTE: For considerations about precedence, when joining predicates, consider note at
and(DescribedPredicate)
predicate
- The predicate to be ORed on the current object filter predicate