Package autocomplete

Class BinarySearchAutocomplete

    • Constructor Detail

      • BinarySearchAutocomplete

        public BinarySearchAutocomplete()
        Constructs an empty instance.
    • Method Detail

      • addAll

        public void addAll​(Collection<? extends CharSequence> terms)
        Description copied from interface: Autocomplete
        Adds the given collection of autocompletion terms.
        Specified by:
        addAll in interface Autocomplete
        Parameters:
        terms - collection containing elements to be added.
      • isPrefixOf

        private static boolean isPrefixOf​(CharSequence prefix,
                                          CharSequence term)
        Description copied from interface: Autocomplete
        Returns true if and only if the given term matches the given prefix.
        Parameters:
        prefix - prefix template.
        term - term to check against the prefix.
        Returns:
        true if and only if the given term matches the given prefix.