@GwtCompatible 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,
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)
Reverses a character sequence.
|
private static void |
swap(char[] buffer,
int f,
int 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, ImmutableMap.Builder<java.lang.String,PublicSuffixType> builder)
stack
- The prefixes that preceed the characters represented by this
node. Each entry of the stack is in reverse order.encoded
- The serialized trie.builder
- A map builder to which all entries will be added.encoded
.private static java.lang.CharSequence reverse(java.lang.CharSequence s)
StringBuffer#reverse
once GWT 2.6 is available.private static void swap(char[] buffer, int f, int s)