Beispiel #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;
 }
Beispiel #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;
      }
    }
  }
Beispiel #3
0
 public void addChild(final TestTreeObject child) {
   child.setParent(this);
   children.add(child);
 }