public boolean mayHaveChildren(@NotNull Node parent){
  return !parent.isLeaf();
}

public boolean mayHaveChildren ( @ NotNull Node parent ) { return ! parent . isLeaf ( ) ; }
checks whether node has children or not . this method may allow tree to determine whether to show expand control near non - leaf node .
