code: public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> void sortByID (@Nonnull final IBasicTree <DATATYPE, ITEMTYPE> aTree,
                                                                                                                     @Nonnull final Comparator <? super KEYTYPE> aKeyComparator)
    {
      _sort (aTree, Comparator.comparing (IHasID::getID, aKeyComparator));
    }
docs: Sort each level of the passed tree on the ID with the specified comparator.
  
  @param <KEYTYPE>
  Tree item key type
  @param <DATATYPE>
  Tree item data type
  @param <ITEMTYPE>
  Tree item type
  @param aTree
  The tree to be sorted.
  @param aKeyComparator
  The comparator to be used for sorting the tree item keys on each
  level.