public boolean isEmpty(){
  return children == null || children.isEmpty();
}

public boolean isEmpty ( ) { return children == null || children . isEmpty ( ) ; }
determines whether or not this element has no children .
