public class AutoCompleteDictionary
extends java.lang.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(java.lang.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(java.lang.String word)
Add a word to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(java.lang.String category,
AutoCompleteDictionary.Item item)
Add an item to the dictionary to use for the autoComplete.
|
boolean |
addToDictionary(java.lang.String category,
java.lang.String word)
Add a word to the dictionary to use for the autoComplete.
|
java.util.Map<java.lang.String,AutoCompleteDictionary.Category> |
getCategories()
Return the map of categories.
|
java.util.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.
|
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(java.lang.String name)
name - the category namepublic void reset()
public boolean addToDictionary(java.lang.String word)
word - the wordpublic boolean addToDictionary(AutoCompleteDictionary.Item item)
item - the itempublic boolean addToDictionary(java.lang.String category,
java.lang.String word)
category - the item categoryword - the wordpublic boolean addToDictionary(java.lang.String category,
AutoCompleteDictionary.Item item)
category - the item categoryitem - the itempublic java.util.List<AutoCompleteDictionary.Category> getDictionary()
public java.util.Map<java.lang.String,AutoCompleteDictionary.Category> getCategories()
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence