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.
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 Summary
Modifier and TypeMethodDescriptiongetBestMatches
(Document document) Analyzes the providedDocument
and returns the single best matching entry.
-
Method Details
-
getBestMatches
Analyzes the providedDocument
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
- theDocument
to analyze; must not benull
- Returns:
- a
Set
ofDocumentEntry
objects that best match the implemented analysis criteria - Throws:
NoSuchElementException
- if no suitable entry can be found
-