@Immutable public final class TreeSorter extends Object
ITree instances recursively.| Modifier and Type | Method and Description |
|---|---|
static <DATATYPE,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> |
sort(IBasicTree<? extends DATATYPE,ITEMTYPE> aTree,
Comparator<? super DATATYPE> aValueComparator)
Sort each level of the passed tree with the specified comparator.
|
static <DATATYPE extends Comparable<? super DATATYPE>,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> |
sort(IBasicTree<DATATYPE,ITEMTYPE> aTree)
Sort each level of the passed tree with the specified comparator.
|
public static <DATATYPE,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> void sort(@Nonnull IBasicTree<? extends DATATYPE,ITEMTYPE> aTree, @Nonnull Comparator<? super DATATYPE> aValueComparator)
DATATYPE - The tree item data typeITEMTYPE - The tree item typeaTree - The tree to be sorted.aValueComparator - The comparator to be used for sorting the tree items on each level.public static <DATATYPE extends Comparable<? super DATATYPE>,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> void sort(@Nonnull IBasicTree<DATATYPE,ITEMTYPE> aTree)
Comparable interface.DATATYPE - The tree item data typeITEMTYPE - The tree item typeaTree - The tree to be sorted.Copyright © 2014–2016 Philip Helger. All rights reserved.