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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> DiscoveryIssueReporter.Condition<T> Create aDiscoveryIssueReporter.Conditionthat 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.booleanEvaluate this condition to potentially report an issue.Returns this condition as aConsumer.Returns this condition as aPredicate.
-
Method Details
-
alwaysSatisfied
Create aDiscoveryIssueReporter.Conditionthat 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
falseto ensure that all issues are reported.- Returns:
- the composed condition; never
null
-
toPredicate
Returns this condition as aPredicate.- Returns:
- this condition as a
Predicate
-
toConsumer
Returns this condition as aConsumer.- Returns:
- this condition as a
Consumer
-