public static class AutocompleteEngine.Builder<T extends Indexable> extends Object
AutocompleteEngine
instances.Constructor and Description |
---|
Builder()
Constructs a new
AutocompleteEngine.Builder . |
Modifier and Type | Method and Description |
---|---|
AutocompleteEngine<T> |
build()
Returns a new
AutocompleteEngine parameterized according to
the builder. |
AutocompleteEngine.Builder<T> |
setAnalyzer(Analyzer analyzer)
Set the analyzer.
|
AutocompleteEngine.Builder<T> |
setAnalyzers(Analyzer... analyzers)
Set the analyzer.
|
AutocompleteEngine.Builder<T> |
setComparator(Comparator<ScoredObject<T>> comparator)
Set the comparator.
|
AutocompleteEngine.Builder<T> |
setIndex(Index<T> index)
Set the index.
|
AutocompleteEngine.Builder<T> |
setIndex(IndexAdapter<T> index)
Set the index.
|
public Builder()
AutocompleteEngine.Builder
.public AutocompleteEngine.Builder<T> setAnalyzer(Analyzer analyzer)
public AutocompleteEngine.Builder<T> setAnalyzers(Analyzer... analyzers)
public AutocompleteEngine.Builder<T> setComparator(@Nullable Comparator<ScoredObject<T>> comparator)
public AutocompleteEngine.Builder<T> setIndex(Index<T> index)
NullPointerException
- if index
is null;public AutocompleteEngine.Builder<T> setIndex(IndexAdapter<T> index)
public AutocompleteEngine<T> build()
AutocompleteEngine
parameterized according to
the builder.NullPointerException
- if analyzer
or index
are null;Copyright © 2017. All rights reserved.