public boolean contains(Element element){
  if (this == element) {
    return true;
  }
  if (children != null) {
    int i=0;
    while (i < children.size()) {
      Element child=(Element)children.get(i);
      if (child.contains(element)) {
        return true;
      }
      i++;
    }
  }
  return false;
}

public boolean contains ( Element element ) { if ( this == element ) { return true ; } if ( children != null ) { int i = 0 ; while ( i < children . size ( ) ) { Element child = ( Element ) children . get ( i ) ; if ( child . contains ( element ) ) { return true ; } i ++ ; } } return false ; }
returns true if the specified element is contained in this element ' s hierarchy ( meaning it is one of its descendants )
