Transforms an item of type T to a String. @param The type of the item to transform.
| 6 | * @param <T> The type of the item to transform. |
| 7 | */ |
| 8 | public interface ToStringFunction<T> { |
| 9 | /** |
| 10 | * Transforms the input item to a string. |
| 11 | * |
| 12 | * @param item The item to transform. |
| 13 | * @return A string to use for comparing the item. |
| 14 | */ |
| 15 | String apply(T item); |
| 16 | |
| 17 | /** |
| 18 | * A default ToStringFunction that returns the input string; |
| 19 | * used by methods that use plain strings in {@link FuzzySearch}. |
| 20 | */ |
| 21 | ToStringFunction<String> NO_PROCESS = new ToStringFunction<String>() { |
| 22 | @Override |
| 23 | public String apply(String item) { |
| 24 | return item; |
| 25 | } |
| 26 | }; |
| 27 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…