GeoPubby
Version 0.1.0.0
|
Facade for indexing and searching Indexable elements. More...
Classes | |
class | Builder |
Builder for constructing AutocompleteEngine instances. More... | |
Public Member Functions | |
boolean | add (T element) |
Indexes a single element. More... | |
boolean | addAll (Collection< T > elements) |
Indexes a collection of elements. More... | |
boolean | remove (T element) |
Removes a single element. More... | |
boolean | removeAll (Collection< T > elements) |
Removes a collection of elements. More... | |
Collection< T > | getAll () |
Gets all elements. More... | |
List< T > | search (String query) |
Returns a List of all elements that match a query, sorted according to the default comparator. More... | |
List< T > | search (String query, int limit) |
Returns a List of the top elements that match a query, sorted according to the default comparator. More... | |
Private Member Functions | |
AutocompleteEngine (Builder< T > builder) | |
Private Attributes | |
final Analyzer | analyzer |
final Comparator< ScoredObject< T > > | comparator |
final IndexAdapter< T > | index |
final Lock | read |
final Lock | write |
Facade for indexing and searching Indexable elements.
|
private |
References AutocompleteEngine< T extends Indexable >.Builder< T extends Indexable >.analyzer, AutocompleteEngine< T extends Indexable >.Builder< T extends Indexable >.comparator, and AutocompleteEngine< T extends Indexable >.Builder< T extends Indexable >.index.
boolean add | ( | T | element | ) |
Indexes a single element.
NullPointerException | if element
|
References AutocompleteEngine< T extends Indexable >.addAll().
boolean addAll | ( | Collection< T > | elements | ) |
Indexes a collection of elements.
NullPointerException | if elements
|
References AutocompleteEngine< T extends Indexable >.analyzer, AutocompleteEngine< T extends Indexable >.index, and AutocompleteEngine< T extends Indexable >.write.
Referenced by AutocompleteEngine< T extends Indexable >.add().
Collection<T> getAll | ( | ) |
boolean remove | ( | T | element | ) |
Removes a single element.
NullPointerException | if element
|
References AutocompleteEngine< T extends Indexable >.removeAll().
boolean removeAll | ( | Collection< T > | elements | ) |
Removes a collection of elements.
NullPointerException | if elements
|
References AutocompleteEngine< T extends Indexable >.index, and AutocompleteEngine< T extends Indexable >.write.
Referenced by AutocompleteEngine< T extends Indexable >.remove().
List<T> search | ( | String | query | ) |
Returns a List of all elements that match a query, sorted according to the default comparator.
NullPointerException | if query
|
References AutocompleteEngine< T extends Indexable >.analyzer, AutocompleteEngine< T extends Indexable >.comparator, AutocompleteEngine< T extends Indexable >.index, and AutocompleteEngine< T extends Indexable >.read.
Referenced by AutocompleteEngine< T extends Indexable >.search().
List<T> search | ( | String | query, |
int | limit | ||
) |
Returns a List of the top elements that match a query, sorted according to the default comparator.
NullPointerException | if query
|
IllegalArgumentException | if limit
|
References AutocompleteEngine< T extends Indexable >.search().
|
private |
|
private |
Referenced by AutocompleteEngine< T extends Indexable >.search().
|
private |
|
private |
Referenced by AutocompleteEngine< T extends Indexable >.search().
|
private |