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:
    DiscoveryIssueReporter.createReportingCondition(Predicate, Function)
    • Method Detail

      • check

        boolean check​(T value)
        Evaluate this condition to potentially report an issue.
      • and

        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.

        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

        default java.util.function.Predicate<T> toPredicate()
        {@return this condition as a {@link Predicate}}
      • toConsumer

        default java.util.function.Consumer<T> toConsumer()
        {@return this condition as a {@link Consumer}}