DATATYPE - tree item value typeITEMTYPE - tree item implementation typepublic class ComparatorTreeItemData<DATATYPE,ITEMTYPE extends IBasicTreeItem<DATATYPE,ITEMTYPE>> extends AbstractPartComparator<ITEMTYPE,DATATYPE>
IBasicTreeItem items by their data using an
explicit Comparator.ITreeItem and
ITreeItemWithID.| Constructor and Description |
|---|
ComparatorTreeItemData(Comparator<? super DATATYPE> aDataComparator)
Constructor with default sort order.
|
ComparatorTreeItemData(Comparator<? super ITEMTYPE> aNestedComparator,
Comparator<? super DATATYPE> aDataComparator)
Comparator with default sort order and a nested comparator.
|
ComparatorTreeItemData(ESortOrder eSortOrder,
Comparator<? super DATATYPE> aDataComparator)
Constructor with sort order.
|
ComparatorTreeItemData(ESortOrder eSortOrder,
Comparator<? super ITEMTYPE> aNestedComparator,
Comparator<? super DATATYPE> aDataComparator)
Constructor with sort order and a nested comparator.
|
| Modifier and Type | Method and Description |
|---|---|
protected DATATYPE |
getPart(ITEMTYPE aTreeItem) |
mainComparecompare, getSortOrder, setSortOrderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic ComparatorTreeItemData(@Nonnull Comparator<? super DATATYPE> aDataComparator)
aDataComparator - Comparator for the data elements. May not be null.public ComparatorTreeItemData(@Nonnull ESortOrder eSortOrder, @Nonnull Comparator<? super DATATYPE> aDataComparator)
aDataComparator - Comparator for the data elements. May not be null.eSortOrder - The sort order to use. May not be null.public ComparatorTreeItemData(@Nullable Comparator<? super ITEMTYPE> aNestedComparator, @Nonnull Comparator<? super DATATYPE> aDataComparator)
aNestedComparator - The nested comparator to be invoked, when the main comparison
resulted in 0.aDataComparator - The comparator for comparing the IDs. May not be null.public ComparatorTreeItemData(@Nonnull ESortOrder eSortOrder, @Nullable Comparator<? super ITEMTYPE> aNestedComparator, @Nonnull Comparator<? super DATATYPE> aDataComparator)
eSortOrder - The sort order to use. May not be null.aNestedComparator - The nested comparator to be invoked, when the main comparison
resulted in 0.aDataComparator - The comparator for comparing the IDs. May not be null.Copyright © 2006–2015 phloc systems. All rights reserved.