@Test public void testGetChild() { DepTreeNode root = new DepTreeNode("root", null); assertEquals(null, root.getChild("child")); DepTreeNode child = root.createOrGet("child", null); assertEquals(child, root.getChild("child")); root.remove(child); assertEquals(null, root.getChild("child")); }
public DepTreeNode getChild(String name) { DepTreeNode result = null; if (children != null) { result = children.get(name); } return result; }
DepTreeNode implements Cloneable, Serializable { public DepTreeNode getChild(String name) { DepTreeNode result = null; if (children != null) { result = children.get(name); } return result; } }
DepTreeNode implements Cloneable, Serializable { public DepTreeNode getChild(String name) { DepTreeNode result = null; if (children != null) { result = children.get(name); } return result; } DepTreeNode(String name, URI uri); }
DepTreeNode implements Cloneable, Serializable { public DepTreeNode getChild(String name) { DepTreeNode result = null; if (children != null) { result = children.get(name); } return result; } DepTreeNode(String name, URI uri); String getName(); long lastModified(); long lastModifiedDep(); long lastModifiedDepTree(); DepTreeNode getParent(); DepTreeNode getRoot(); String[] getDefineDepArray(); String[] getRequireDepArray(); String[] getDependentFeatures(); String getParentPath(); String getFullPathName(); void add(DepTreeNode child); void overlay(DepTreeNode node); void addAll(Collection<DepTreeNode> children); DepTreeNode createOrGet(String path, URI uri); DepTreeNode getDescendent(String path); void remove(DepTreeNode child); void removeAll(); Map<String, DepTreeNode> getChildren(); DepTreeNode getChild(String name); void prune(); void setDependencies(String[] defineDependencies, String[] requireDependencies, String[] dependentFeatures, long lastModifiedFile, long lastModifiedDep); @Override String toString(); String toStringTree(); @Override DepTreeNode clone(); IConfig getConfig(); }
DepTreeNode implements Cloneable, Serializable { public DepTreeNode getChild(String name) { DepTreeNode result = null; if (children != null) { result = children.get(name); } return result; } DepTreeNode(String name, URI uri); String getName(); long lastModified(); long lastModifiedDep(); long lastModifiedDepTree(); DepTreeNode getParent(); DepTreeNode getRoot(); String[] getDefineDepArray(); String[] getRequireDepArray(); String[] getDependentFeatures(); String getParentPath(); String getFullPathName(); void add(DepTreeNode child); void overlay(DepTreeNode node); void addAll(Collection<DepTreeNode> children); DepTreeNode createOrGet(String path, URI uri); DepTreeNode getDescendent(String path); void remove(DepTreeNode child); void removeAll(); Map<String, DepTreeNode> getChildren(); DepTreeNode getChild(String name); void prune(); void setDependencies(String[] defineDependencies, String[] requireDependencies, String[] dependentFeatures, long lastModifiedFile, long lastModifiedDep); @Override String toString(); String toStringTree(); @Override DepTreeNode clone(); IConfig getConfig();  }