Package autocomplete
Interface Autocomplete
-
- All Known Implementing Classes:
BinarySearchAutocomplete
,SequentialSearchAutocomplete
,TernarySearchTreeAutocomplete
,TreeSetAutocomplete
public interface Autocomplete
Suggest exact-character prefix matches for any queryCharSequence
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAll(Collection<? extends CharSequence> terms)
Adds the given collection of autocompletion terms.List<CharSequence>
allMatches(CharSequence prefix)
Returns all autocompletion terms that match the given prefix.static boolean
isPrefixOf(CharSequence prefix, CharSequence term)
Returns true if and only if the given term matches the given prefix.
-
-
-
Method Detail
-
addAll
void addAll(Collection<? extends CharSequence> terms)
Adds the given collection of autocompletion terms.- Parameters:
terms
- collection containing elements to be added.
-
allMatches
List<CharSequence> allMatches(CharSequence prefix)
Returns all autocompletion terms that match the given prefix.- Parameters:
prefix
- search query.
-
isPrefixOf
static boolean isPrefixOf(CharSequence prefix, CharSequence term)
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.
-
-