Exemplo n.º 1
0
 public TestTreeObject findNode(final String myName) {
   if (name.equals(myName)) {
     return this;
   }
   TestTreeObject result;
   for (final TestTreeObject obj : children) {
     if ((result = obj.findNode(myName)) != null) {
       return result;
     }
   }
   return null;
 }
Exemplo n.º 2
0
  // updates type
  public void updateType() {
    if (children.size() == 0) {
      return;
    }

    type = TestTreeObject.SUCCESS;

    for (final TestTreeObject child : children) {
      if (child.getType() != TestTreeObject.SUCCESS) {
        type = TestTreeObject.WARN;
      }
    }
  }
Exemplo n.º 3
0
 public void addChild(final TestTreeObject child) {
   child.setParent(this);
   children.add(child);
 }