Interface IDocumentAnalyser

All Known Implementing Classes:
CountryAnalyser, WeatherAnalyser
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 IDocumentAnalyser
Functional interface that defines a contract for analyzing a Document containing DocumentEntry objects to determine the best matching entry based on a specific criterion.
  • Method Details

    • getBestMatches

      Set<DocumentEntry> getBestMatches(Document document) throws NoSuchElementException
      Analyzes the provided Document and returns the single best matching entry.

      The definition of "best match" is determined by the implementing class, which may apply filtering, sorting, or scoring logic to select the optimal result.

      Parameters:
      document - the Document to analyze; must not be null
      Returns:
      a Set of DocumentEntry objects that best match the implemented analysis criteria
      Throws:
      NoSuchElementException - if no suitable entry can be found