Package com.blackrook.small.struct
Class URITrie<V>
java.lang.Object
com.blackrook.small.struct.URITrie<V>
- Type Parameters:
- V- the value type at a resolved node.
A trie that organizes mapping URI patterns to values.
- Author:
- Matthew Tropiano
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classAn exception thrown when a bad URI parse happens.static classResult class after a URITrie search.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a path to the trie.voidprintTo(PrintStream out) Attempts to resolve a value for a given URI.
- 
Field Details- 
DEFAULT_TOKENToken content for "default" path.- See Also:
 
 
- 
- 
Constructor Details- 
URITriepublic URITrie()Creates a new blank URI Trie.
 
- 
- 
Method Details- 
addAdds a path to the trie.- Parameters:
- uri- the request URI path.
- value- the mapped value.
- Throws:
- URITrie.ParseException- if a path parsing error occurs.
- PatternSyntaxException- if a regex expression is invalid in one of the paths.
 
- 
resolveAttempts to resolve a value for a given URI.- Parameters:
- uri- the input URI.
- Returns:
- a result object detailing the search.
 
- 
printTo
 
-