|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.zookeeper.common.PathTrie
public class PathTrie
a class that implements prefix matching for components of a filesystem path. the trie looks like a tree with edges mapping to the component of a path. example /ab/bc/cf would map to a trie / ab/ (ab) bc/ / (bc) cf/ (cf)
| Constructor Summary | |
|---|---|
PathTrie()
construct a new PathTrie with a root node of / |
|
| Method Summary | |
|---|---|
void |
addPath(String path)
add a path to the path trie |
void |
deletePath(String path)
delete a path from the trie |
String |
findMaxPrefix(String path)
return the largest prefix for the input path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PathTrie()
| Method Detail |
|---|
public void addPath(String path)
path - public void deletePath(String path)
path - the path to be deletedpublic String findMaxPrefix(String path)
path - the input path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||