Interface AutocompletionModel<T>

  • Type Parameters:
    T - the type of suggestions this model gives.

    public interface AutocompletionModel<T>
    A model to generate the suggested completions, given a viable prefix.
    • Method Detail

      • computeCompletions

        java.util.Collection<T> computeCompletions​(java.lang.String text)
        Compute a collection of possible completions to the given text (prefix).
        Parameters:
        text - the prefix, i.e., the text to the left of the user's caret.
        Returns:
        a (possibly null or empty) list of suggested completions. NOTE: there is no requirement that the returned items actually start with the given prefix; however, by default, the displayed text for the suggested item is inserted at the caret, without changing the surrounding text.