Interface Filter<T>

Type Parameters:
T - type of objects being filtered.
All Superinterfaces:
Predicate<T>
All Known Implementing Classes:
MappingPdxSerializer.TypeFilters
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> extends Predicate<T>
The Filter interface defines a contract for filtering objects.
Since:
1.0.0
Author:
John Blum
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(T obj)
    Evaluates the given Object and determines whether the Object is accepted based on the filter criteria.
    default boolean
    test(T obj)
    Tests whether the given Object matches the criteria defined by this Filter.

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Method Details

    • accept

      boolean accept(@Nullable T obj)
      Evaluates the given Object and determines whether the Object is accepted based on the filter criteria.
      Parameters:
      obj - Object to filter.
      Returns:
      a boolean value indicating whether this Filter accepts the given Object based on the filter criteria.
    • test

      default boolean test(T obj)
      Tests whether the given Object matches the criteria defined by this Filter.
      Specified by:
      test in interface Predicate<T>
      Parameters:
      obj - Object to test.
      Returns:
      a boolean value indicating whether the given Object matches the criteria defined by this Filter.
      See Also: