Package hudson.search
Class CollectionSearchIndex<SMT extends SearchableModelObject>
- java.lang.Object
-
- hudson.search.CollectionSearchIndex<SMT>
-
- All Implemented Interfaces:
SearchIndex
public abstract class CollectionSearchIndex<SMT extends SearchableModelObject> extends Object implements SearchIndex
SearchIndex
built on aMap
.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from interface hudson.search.SearchIndex
EMPTY
-
-
Constructor Summary
Constructors Constructor Description CollectionSearchIndex()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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 ofSearchIndex.find(String, List)
.
-
-
-
Method Detail
-
get
protected abstract SearchItem get(String key)
Gets a single item that exactly matches the given key.
-
all
protected abstract Collection<SMT> all()
Returns all items in the map. The collection can include null items.
-
find
public void find(String token, List<SearchItem> result)
- Specified by:
find
in interfaceSearchIndex
-
suggest
public void suggest(String token, List<SearchItem> result)
Description copied from interface:SearchIndex
This method returns the superset ofSearchIndex.find(String, List)
.- Specified by:
suggest
in interfaceSearchIndex
-
-