public class DocumentSearchCache<T extends PluginDocument> extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addDocumentsUpdatedListener(SimpleListener listener)
Add a listener to be fired when the list of documents in the cache changes (either because
new documents are added or old documents have been deleted).
|
List<AnnotatedPluginDocument> |
getDocuments() |
static <T extends PluginDocument> |
getDocumentSearchCacheFor(DocumentType<T> documentType)
Gets a cache for the given document type, creating the cache if necessary and caching the cache so that future calls to this method
return the same cache.
|
DocumentType<T> |
getDocumentType() |
boolean |
hasSearchedEntireDatabase() |
public static <T extends PluginDocument> DocumentSearchCache<T> getDocumentSearchCacheFor(DocumentType<T> documentType)
T - documentType - the type of document to find all occurances of.public void addDocumentsUpdatedListener(SimpleListener listener)
listener - the listener to notify.public DocumentType<T> getDocumentType()
DocumentSearchCache will search forpublic List<AnnotatedPluginDocument> getDocuments()
AnnotatedPluginDocument.getDocumentOrCrash().public boolean hasSearchedEntireDatabase()
addDocumentsUpdatedListener(org.virion.jam.util.SimpleListener) to find out when documents have been added to or removed from the cache.