| 限定符和类型 | 方法和说明 |
|---|---|
Trie.TrieBuilder |
addKeyword(String keyword)
Adds a keyword to the Trie's list of text search keywords.
|
Trie.TrieBuilder |
addKeywords(Collection<String> keywords)
Adds a list of keywords to the Trie's list of text search keywords.
|
Trie.TrieBuilder |
addKeywords(String... keywords)
Adds a list of keywords to the Trie's list of text search keywords.
|
Trie |
build()
Configure the Trie based on the builder settings.
|
Trie.TrieBuilder |
caseInsensitive()
已过时。
Use ignoreCase()
|
Trie.TrieBuilder |
ignoreCase()
Configure the Trie to ignore case when searching for keywords in
the text.
|
Trie.TrieBuilder |
ignoreOverlaps()
Configure the Trie to ignore overlapping keywords.
|
Trie.TrieBuilder |
onlyWholeWords()
Configure the Trie to match whole keywords in the text.
|
Trie.TrieBuilder |
onlyWholeWordsWhiteSpaceSeparated()
Configure the Trie to match whole keywords that are separated by
whitespace in the text.
|
Trie.TrieBuilder |
removeOverlaps()
已过时。
Use ignoreOverlaps()
|
Trie.TrieBuilder |
stopOnHit()
Configure the Trie to stop after the first keyword is found in the
text.
|
public Trie.TrieBuilder ignoreCase()
public Trie.TrieBuilder ignoreOverlaps()
public Trie.TrieBuilder addKeyword(String keyword)
keyword - The keyword to add to the list.NullPointerException - if the keyword is null.public Trie.TrieBuilder addKeywords(String... keywords)
keywords - The keywords to add to the list.public Trie.TrieBuilder addKeywords(Collection<String> keywords)
keywords - The keywords to add to the list.public Trie.TrieBuilder onlyWholeWords()
public Trie.TrieBuilder onlyWholeWordsWhiteSpaceSeparated()
public Trie.TrieBuilder stopOnHit()
public Trie build()
public Trie.TrieBuilder caseInsensitive()
public Trie.TrieBuilder removeOverlaps()
Copyright © 2021. All rights reserved.