Interface FilteringFeed.Filter

All Known Implementing Classes:
FilteringFeed.FilterLambda, SubsequenceStreamer.SubsequenceFilter
Enclosing class:
FilteringFeed
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 static interface FilteringFeed.Filter
Interface defining the filter function, to be implemented by the caller
  • Method Summary

    Modifier and Type
    Method
    Description
    matches(Item item, int position)
    Test whether a given item, at a given position in the sequence, matches the filter
  • Method Details

    • matches

      FilteringFeed.FilterResult matches(Item item, int position) throws XPathException
      Test whether a given item, at a given position in the sequence, matches the filter
      Parameters:
      item - the item to be matched
      position - the 1-based position of the item in the sequence
      Returns:
      MATCHES if the item is to be included in the result, SKIP if it is to be excluded; DONE if this and all future items are to be excluded
      Throws:
      XPathException - if a dynamic error occurs