public void sortChildrenByContent(Comparator<? super T> comparator){
  Comparator<TreeNode<T>> byContent=Comparator.comparing(null,comparator);
  sortChildrenByNode(byContent);
}

public void sortChildrenByContent ( Comparator < ? super T > comparator ) { Comparator < TreeNode < T > > byContent = Comparator . comparing ( null , comparator ) ; sortChildrenByNode ( byContent ) ; }
recursively sorts all children using the given comparator of their content .
