Interface Filter<T>

  • All Known Implementing Classes:
    AndFilter, NotFilter, OrFilter
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Filter<T>
    Filter to test to elements against.
    • Method Detail

      • test

        boolean test​(T t)
        Predicate test
        Parameters:
        t - the element test against
        Returns:
        true if matches
      • negate

        default Filter<T> negate()
        Negate this filter.
        Returns:
        negated filter
      • and

        default Filter<T> and​(Filter<T> filter)
        Combine this filter with another using logical AND
        Parameters:
        filter - the other filter
        Returns:
        filter which performs AND operation
      • or

        default Filter<T> or​(Filter<T> filter)
        Combine this filter with another using logical OR
        Parameters:
        filter - the other filter
        Returns:
        filter which performs OR operation