Interface Filter.TypedFilter<T>

All Superinterfaces:
Filter<T>, Serializable
All Known Implementing Classes:
StoreElementFilter, TypedFilter
Enclosing interface:
Filter<T>

public static interface Filter.TypedFilter<T> extends Filter<T>
Extension to a filter definition that provides the element in question as type safe object, if the filter accepted it.
Since:
5.0.20
  • Method Details

    • getType

      @NotNull @NotNull Class<T> getType()
      Get the element type of this instance, all filtered instances are of this type.
      Returns:
      The element type.
      Since:
      4.0.17
    • filter

      @Nullable T filter(Object element)
      Filter the given element and return either an object of this classes type T or null, if the element does not match the filter as defined by Filter.accept(Object).
      Parameters:
      element - The element to be filtered.
      Returns:
      The correctly typed element or null.
      Since:
      4.0.17