-
Couldn't load subscription status.
- Fork 129
Closed
Labels
Description
First of all, thank you for this great library.
However, there's a small issue I have with it: For one of my projects I'm implementing a search for JavaDoc methods and have a class JavadocMethod with methods like getMethodName(), getClassName() and getUrl().
For searching it would be very convenient to just use the object itself for search, so I can access the url of the found method.
I'm thinking about a generic solution like this:
public static <T> List<ExtractedResult<T>> extractTop(String query, Collection<T> choices, Function<T, String> mapper, int limit)which allows to use any object by just providing a function which maps this object to a string.
Collection<JavadocMethod> methods = ...;
FuzzySearch.extractTop("String#valeuOf(loong)", methods, method -> String.format("%s#%s", method.getClassName(), method.getMethodName()), 5);Can you imagine implementing such a feature or accept a pull requests that adds it?