public abstract class CollectionSearchIndex<SMT extends SearchableModelObject> extends Object implements SearchIndex
SearchIndex
built on a Map
.EMPTY
Constructor and Description |
---|
CollectionSearchIndex() |
Modifier and Type | Method and Description |
---|---|
protected abstract Collection<SMT> |
all()
Returns all items in the map.
|
protected Iterable<SMT> |
allAsIterable() |
void |
find(String token,
List<SearchItem> result) |
protected abstract SearchItem |
get(String key)
Gets a single item that exactly matches the given key.
|
protected String |
getName(SMT o) |
void |
suggest(String token,
List<SearchItem> result)
This method returns the superset of
SearchIndex.find(String, List) . |
protected abstract SearchItem get(String key)
protected abstract Collection<SMT> all()
public void find(String token, List<SearchItem> result)
find
in interface SearchIndex
public void suggest(String token, List<SearchItem> result)
SearchIndex
SearchIndex.find(String, List)
.suggest
in interface SearchIndex
Copyright © 2004–2021. All rights reserved.