Compare commits
1 Commits
master
...
issue39_ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
713632dded |
@ -53,7 +53,7 @@ public class Trie {
|
|||||||
return asEmits(parsedText);
|
return asEmits(parsedText);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("UnusedReturnValue")
|
||||||
public Collection<Emit> parseText( final CharSequence text, final StatefulEmitHandler emitHandler) {
|
public Collection<Emit> parseText( final CharSequence text, final StatefulEmitHandler emitHandler) {
|
||||||
Collection<PayloadEmit<String>> parsedText = this.payloadTrie.parseText(text,
|
Collection<PayloadEmit<String>> parsedText = this.payloadTrie.parseText(text,
|
||||||
new StatefulPayloadEmitDelegateHandler(emitHandler));
|
new StatefulPayloadEmitDelegateHandler(emitHandler));
|
||||||
@ -90,10 +90,6 @@ public class Trie {
|
|||||||
|
|
||||||
public static class TrieBuilder {
|
public static class TrieBuilder {
|
||||||
|
|
||||||
private final TrieConfig trieConfig = new TrieConfig();
|
|
||||||
|
|
||||||
private final PayloadTrie<String> trie = new PayloadTrie<>(trieConfig);
|
|
||||||
|
|
||||||
private final PayloadTrieBuilder<String> delegate = PayloadTrie.builder();
|
private final PayloadTrieBuilder<String> delegate = PayloadTrie.builder();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,6 +153,7 @@ public class Trie {
|
|||||||
* @param keywords The keywords to add to the list.
|
* @param keywords The keywords to add to the list.
|
||||||
* @return This builder.
|
* @return This builder.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public TrieBuilder addKeywords( final Collection<String> keywords ) {
|
public TrieBuilder addKeywords( final Collection<String> keywords ) {
|
||||||
for (String keyword : keywords) {
|
for (String keyword : keywords) {
|
||||||
this.delegate.addKeyword(keyword, null);
|
this.delegate.addKeyword(keyword, null);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user