public class AutoCompleteDictionary extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AutoCompleteDictionary.Category
Represents a category of results in the dictionnary.
|
static interface |
AutoCompleteDictionary.Item
A common interface for items to use for the Autocomplete.
|
| Constructor and Description |
|---|
AutoCompleteDictionary() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptDuplicates(boolean acceptDuplicates)
Set if the dictionnary accept duplicates.
|
boolean |
addCategory(AutoCompleteDictionary.Category category)
Add a Category to the dictionary.
|
AutoCompleteDictionary.Category |
addCategory(String name)
Add a Category to the dictionary.
|
boolean |
addToDictionary(AutoCompleteDictionary.Item item)
Add an item to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(String word)
Add a word to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(String category,
AutoCompleteDictionary.Item item)
Add an item to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(String category,
String word)
Add a word to the dictionary to use for the autoComplete.
|
Map<String,AutoCompleteDictionary.Category> |
getCategories()
Return the map of categories.
|
List<AutoCompleteDictionary.Category> |
getDictionary()
Return the dictionary.
|
boolean |
hasDefaultCategory()
Return true if the dictionnary uses only the default category.
|
boolean |
isAcceptingDuplicates()
Return true if the dictionnary accept duplicates.
|
boolean |
removeCategory(AutoCompleteDictionary.Category category)
Remove a category from the dictionary.
|
boolean |
removeCategory(String name)
Remove a category from the dictionary.
|
boolean |
removeFromDictionary(AutoCompleteDictionary.Item item)
Remove an item from the dictionary to use for the autoComplete.
|
boolean |
removeFromDictionary(String word)
Remove a word from the dictionary to use for the autoComplete.
|
boolean |
removeFromDictionary(String category,
AutoCompleteDictionary.Item item)
Remove an item from the dictionary to use for the autoComplete.
|
boolean |
removeFromDictionary(String category,
String word)
Remove a word from the dictionary to use for the autoComplete.
|
void |
reset()
Reset the Dictionnary to use for the autoComplete.
|
public void acceptDuplicates(boolean acceptDuplicates)
acceptDuplicates - true if the dictionnary accept duplicatespublic boolean isAcceptingDuplicates()
public boolean hasDefaultCategory()
public boolean addCategory(AutoCompleteDictionary.Category category)
category - the categorypublic AutoCompleteDictionary.Category addCategory(String name)
name - the category namepublic boolean removeCategory(AutoCompleteDictionary.Category category)
category - the categorypublic boolean removeCategory(String name)
name - the category namepublic void reset()
public boolean addToDictionary(String word)
word - the wordpublic boolean addToDictionary(AutoCompleteDictionary.Item item)
item - the itempublic boolean addToDictionary(String category, String word)
category - the item categoryword - the wordpublic boolean addToDictionary(String category, AutoCompleteDictionary.Item item)
category - the item categoryitem - the itempublic boolean removeFromDictionary(String word)
word - the wordpublic boolean removeFromDictionary(AutoCompleteDictionary.Item item)
item - the itempublic boolean removeFromDictionary(String category, String word)
category - the item categoryword - the wordpublic boolean removeFromDictionary(String category, AutoCompleteDictionary.Item item)
category - the item categoryitem - the itempublic List<AutoCompleteDictionary.Category> getDictionary()
public Map<String,AutoCompleteDictionary.Category> getCategories()