@Immutable public final class TreeSorter extends Object
ITree instances recursively.| Modifier and Type | Method and Description |
|---|---|
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.
|
static <DATATYPE,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> |
sort(IBasicTree<DATATYPE,ITEMTYPE> aTree,
Comparator<? super DATATYPE> aValueComparator)
Sort each level of the passed tree with the specified comparator.
|
public static <DATATYPE,ITEMTYPE extends ITreeItem<DATATYPE,ITEMTYPE>> void sort(@Nonnull IBasicTree<DATATYPE,ITEMTYPE> aTree, @Nonnull Comparator<? super DATATYPE> aValueComparator)
aTree - 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.aTree - The tree to be sorted.Copyright © 2006–2014 phloc systems. All rights reserved.