Package guideme.indices
Class MultiValuedIndex<K,V>
java.lang.Object
guideme.indices.MultiValuedIndex<K,V>
- All Implemented Interfaces:
PageIndex
- Direct Known Subclasses:
CategoryIndex
A convenient index base-class for indices that map keys to multiple pages.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface guideme.indices.PageIndex
PageIndex.JsonSerializer<T> -
Constructor Summary
ConstructorsConstructorDescriptionMultiValuedIndex(String name, MultiValuedIndex.EntryFunction<K, V> entryFunction, PageIndex.JsonSerializer<K> keySerializer, PageIndex.JsonSerializer<V> valueSerializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidexport(com.google.gson.stream.JsonWriter writer) Serialize the index to JSON for export to the website.getName()voidrebuild(List<ParsedGuidePage> pages) Fully rebuilds this index.booleanvoidupdate(List<ParsedGuidePage> allPages, List<GuidePageChange> changes) Applies an incremental update to this index.
-
Constructor Details
-
MultiValuedIndex
public MultiValuedIndex(String name, MultiValuedIndex.EntryFunction<K, V> entryFunction, PageIndex.JsonSerializer<K> keySerializer, PageIndex.JsonSerializer<V> valueSerializer)
-
-
Method Details
-
getName
-
get
-
supportsUpdate
public boolean supportsUpdate()- Specified by:
supportsUpdatein interfacePageIndex- Returns:
- True if this index supports incremental updates via the
PageIndex.update(java.util.List<guideme.compiler.ParsedGuidePage>, java.util.List<guideme.GuidePageChange>)method.
-
rebuild
Description copied from interface:PageIndexFully rebuilds this index. -
update
Description copied from interface:PageIndexApplies an incremental update to this index. -
export
Description copied from interface:PageIndexSerialize the index to JSON for export to the website.- Specified by:
exportin interfacePageIndex- Throws:
IOException
-