Home | History | Annotate | Download | only in data

Lines Matching refs:Path

25 public class Path {
26 private static final String TAG = "Path";
27 private static Path sRoot = new Path(null, "ROOT");
29 private final Path mParent;
32 private IdentityCache<String, Path> mChildren;
34 private Path(Path parent, String segment) {
39 public Path getChild(String segment) {
40 synchronized (Path.class) {
42 mChildren = new IdentityCache<String, Path>();
44 Path p = mChildren.get(segment);
48 Path p = new Path(this, segment);
54 public Path getParent() {
55 synchronized (Path.class) {
60 public Path getChild(int segment) {
64 public Path getChild(long segment) {
69 synchronized (Path.class) {
76 synchronized (Path.class) {
84 synchronized (Path.class) {
96 String path = toString();
97 return path.equalsIgnoreCase(p);
100 public static Path fromString(String s) {
101 synchronized (Path.class) {
103 Path current = sRoot;
112 synchronized (Path.class) {
114 for (Path p = this; p != sRoot; p = p.mParent) {
119 for (Path p = this; p != sRoot; p = p.mParent) {
130 throw new RuntimeException("malformed path:" + s);
144 throw new RuntimeException("unbalanced brace in path:" + s);
173 throw new RuntimeException("unbalanced brace in path:" + s);
188 public Path getPrefixPath() {
189 synchronized (Path.class) {
190 Path current = this;
208 synchronized (Path.class) {
209 sRoot = new Path(null, "");
217 static void dumpAll(Path p, String prefix1, String prefix2) {
218 synchronized (Path.class) {
226 Path child = p.mChildren.get(key);