public final class TrieNode<T> extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
PARAMETER_PATTERN
TemplateParameters pattern regexp.
|
Modifier | Constructor and Description |
---|---|
protected |
TrieNode()
Creates a new instance of TrieNode
|
protected |
TrieNode(T value)
Creates a new instance of TrieNode
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(String path,
T value,
UriPattern pattern)
Adds a new node to the tree.
|
int |
getArcs()
arcs getter.
|
protected TrieArc<T> |
getFirstArc()
firstArch getter.
|
UriPattern |
getPattern()
pattern getter.
|
Iterator<T> |
getValue()
value getter.
|
protected boolean |
hasValue()
Tells if there is a value in this node.
|
protected boolean |
isWildcard()
wildcard getter.
|
protected TrieArc<T> |
matchExitArc(CharSequence seq,
int i)
Search for a matching escape character in a wildcard sequence.
|
void |
pack()
Pack and optimize the automata.
|
protected void |
setValue(T value,
UriPattern pattern)
value setter.
|
protected void |
setWildcard(boolean b)
wildcard setter.
|
String |
toString() |
public static final Pattern PARAMETER_PATTERN
protected TrieNode()
protected TrieNode(T value)
value
- Initial value.protected void setWildcard(boolean b)
b
- New wildcard value.protected void setValue(T value, UriPattern pattern)
value
- New value.template
- Associated template.protected TrieArc<T> matchExitArc(CharSequence seq, int i)
c
- Test char.protected boolean hasValue()
protected void add(String path, T value, UriPattern pattern)
path
- Matching URIvalue
- Value to be added.template
- Associated UriPattern.public String toString()
toString
in class Object
Object.toString()
public UriPattern getPattern()
protected boolean isWildcard()
public int getArcs()
public void pack()
Copyright © 2013 Oracle Corporation. All rights reserved.