code: public BaseCondition getRoot() {
        BaseCondition p = this;
        while (p.getParent() != null) {
           p = p.getParent();
        }
        return p;
     }
docs: Returns the topmost condition, never {@code null}.
  
  @return the topmost condition following up the parent chain or {@code this} if parent is {@code null}.