Package org.naviqore.utils.search
Class SearchIndexBuilder<T>
java.lang.Object
org.naviqore.utils.search.SearchIndexBuilder<T>
- Type Parameters:
T- the type of objects to be indexed.
Builder class for creating a SearchIndex with key-value pairs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a key-value pair to the builder.build()Builds the SearchIndex by compressing the underlying Trie.
-
Constructor Details
-
SearchIndexBuilder
public SearchIndexBuilder()
-
-
Method Details
-
add
Adds a key-value pair to the builder.- Parameters:
key- the string key to be indexed.value- the value associated with the key.- Returns:
- the builder instance.
-
build
Builds the SearchIndex by compressing the underlying Trie.- Returns:
- the built and compressed SearchIndex.
-