code: public static <KEYTYPE, DATATYPE extends Comparable <? super DATATYPE>, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> void sortByValue (@Nonnull final IBasicTree <DATATYPE, ITEMTYPE> aTree)
    {
      _sort (aTree, (o1, o2) -> o1.getData ().compareTo (o2.getData ()));
    }
docs: Sort each level of the passed tree on the value with the specified
  comparator. This method assumes that the values in the tree item implement
  the {@link Comparable} interface.
  
  @param <KEYTYPE>
  Tree item key type
  @param <DATATYPE>
  Tree item data type
  @param <ITEMTYPE>
  Tree item type
  @param aTree
  The tree to be sorted.