@GwtCompatible final class TrieParser extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static Joiner |
PREFIX_JOINER |
Constructor and Description |
---|
TrieParser() |
Modifier and Type | Method and Description |
---|---|
private static int |
doParseTrieToBuilder(java.util.List<java.lang.CharSequence> stack,
java.lang.CharSequence encoded,
int start,
ImmutableMap.Builder<java.lang.String,PublicSuffixType> builder)
Parses a trie node and returns the number of characters consumed.
|
(package private) static ImmutableMap<java.lang.String,PublicSuffixType> |
parseTrie(java.lang.CharSequence encoded)
Parses a serialized trie representation of a map of reversed public suffixes into an immutable
map of public suffixes.
|
private static java.lang.CharSequence |
reverse(java.lang.CharSequence s) |
private static final Joiner PREFIX_JOINER
static ImmutableMap<java.lang.String,PublicSuffixType> parseTrie(java.lang.CharSequence encoded)
private static int doParseTrieToBuilder(java.util.List<java.lang.CharSequence> stack, java.lang.CharSequence encoded, int start, ImmutableMap.Builder<java.lang.String,PublicSuffixType> builder)
stack
- The prefixes that precede the characters represented by this node. Each entry of
the stack is in reverse order.encoded
- The serialized trie.start
- An index in the encoded serialized trie to begin reading characters from.builder
- A map builder to which all entries will be added.encoded
.private static java.lang.CharSequence reverse(java.lang.CharSequence s)