Interface DiscoveryIssueReporter.Condition<T>
- Enclosing interface:
DiscoveryIssueReporter
public static interface DiscoveryIssueReporter.Condition<T>
A
Condition
is a union of Predicate
and Consumer
.
Instances of this type may be used as Predicates
or
Consumers
. For example, a Condition
may be
passed to Stream.filter(Predicate)
if it is used
for filtering, or to Stream.peek(Consumer)
if it
is only used for reporting or other side effects.
This interface is not intended to be implemented by clients.
- Since:
- 1.13
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> DiscoveryIssueReporter.Condition
<T> Create aDiscoveryIssueReporter.Condition
that is always satisfied.default DiscoveryIssueReporter.Condition
<T> and
(DiscoveryIssueReporter.Condition<? super T> that) Return a composed condition that represents a logical AND of this and the supplied condition.boolean
Evaluate this condition to potentially report an issue.Returns this condition as aConsumer
.Returns this condition as aPredicate
.
-
Method Details
-
alwaysSatisfied
Create aDiscoveryIssueReporter.Condition
that is always satisfied. -
check
Evaluate this condition to potentially report an issue. -
and
Return a composed condition that represents a logical AND of this and the supplied condition.The default implementation avoids short-circuiting so both conditions will be evaluated even if this condition returns
false
to ensure that all issues are reported.- Returns:
- the composed condition; never
null
-
toPredicate
-
toConsumer
-