Package no.digipost.util.bisect
Interface Suggester<T>
-
- Type Parameters:
T- The type of suggestions generated by this function
- 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 Suggester<T>
A suggester function is used byBisectSearchto generate suggestions from distinct "points" of a range of integers. A suggestion must align its ordering with the natural ordering of integers for a bisection search to work.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Suggestion<? extends T>suggest(int point)Generate aSuggestion.
-
-
-
Method Detail
-
suggest
Suggestion<? extends T> suggest(int point) throws Exception
Generate aSuggestion.- Parameters:
point- the "point" which the geenrated suggestion must be based on- Returns:
- the suggestion
- Throws:
Exception
-
-