diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DictionaryIdentifierTrie.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DictionaryIdentifierTrie.java index b2a8c291..e74637f2 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DictionaryIdentifierTrie.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DictionaryIdentifierTrie.java @@ -5,31 +5,31 @@ import org.ahocorasick.trie.PayloadTrie; import java.util.Collection; -public class DictionaryIdentifierTrie { +public final class DictionaryIdentifierTrie { private final PayloadTrie trie; private DictionaryIdentifierTrie(PayloadTrie trie) { this.trie = trie; } - public static class Builder { + public static class DictionaryIdentifierTrieBuilder { private final PayloadTrie.PayloadTrieBuilder builder; - public Builder() { + public DictionaryIdentifierTrieBuilder() { this.builder = PayloadTrie.builder(); } - public Builder ignoreCase() { + public DictionaryIdentifierTrieBuilder ignoreCase() { builder.ignoreCase(); return this; } - public Builder addKeyword(String keyword, DictionaryIdentifier payload) { + public DictionaryIdentifierTrieBuilder addKeyword(String keyword, DictionaryIdentifier payload) { builder.addKeyword(keyword, payload); return this; } - public Builder addKeywords(Collection keywords, DictionaryIdentifier payload) { + public DictionaryIdentifierTrieBuilder addKeywords(Collection keywords, DictionaryIdentifier payload) { for (String keyword : keywords) { builder.addKeyword(keyword, payload); } diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DoubleArrayTrieDictionarySearch.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DoubleArrayTrieDictionarySearch.java index fdb42e52..dc0aa62b 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DoubleArrayTrieDictionarySearch.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/DoubleArrayTrieDictionarySearch.java @@ -137,7 +137,7 @@ public class DoubleArrayTrieDictionarySearch implements DictionarySearch { private final int offset; - public TextContext(CharSequence text, int offset) { + TextContext(CharSequence text, int offset) { this.text = text; this.lowerText = text.toString().toLowerCase(Locale.ROOT); @@ -145,7 +145,7 @@ public class DoubleArrayTrieDictionarySearch implements DictionarySearch { } - public TextContext(CharSequence text) { + TextContext(CharSequence text) { this(text, 0); } diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/TrieDictionarySearch.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/TrieDictionarySearch.java index 4c646885..c944b22e 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/TrieDictionarySearch.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/model/dictionary/TrieDictionarySearch.java @@ -39,7 +39,7 @@ public class TrieDictionarySearch implements DictionarySearch { if (entries.isEmpty()) { return null; } - DictionaryIdentifierTrie.Builder builder = new DictionaryIdentifierTrie.Builder(); + DictionaryIdentifierTrie.DictionaryIdentifierTrieBuilder builder = new DictionaryIdentifierTrie.DictionaryIdentifierTrieBuilder(); if (ignoreCase) { builder.ignoreCase(); }