Interface IGroupByComparator<T>
- Type Parameters:
T
- The type of the base objects carried in the TreeList
- All Superinterfaces:
Comparator<Object>
- All Known Implementing Classes:
GroupByComparator
Comparator
interface specialization for a comparator that can be used
to sort the tree structure in a groupBy composition.-
Method Summary
Modifier and TypeMethodDescriptionvoid
For performance reasons theIGroupByComparator
might cache several information e.g.void
setDataLayer
(GroupByDataLayer<T> dataLayer) void
setSortModel
(ISortModel sortModel) void
setTreeLayer
(IUniqueIndexLayer treeLayer) Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
getSortModel
ISortModel getSortModel()- Returns:
- The
ISortModel
that is used to retrieve the column value comparators and the sort direction in case a groupBy value is sorted which will directly affect the tree structure build. Can benull
which leads to a static tree structure that only allows sorting for leafs within groups.
-
setSortModel
- Parameters:
sortModel
- TheISortModel
that is used to retrieve the column value comparators and the sort direction in case a groupBy value is sorted which will directly affect the tree structure build. Can benull
which leads to a static tree structure that only allows sorting for leafs within groups.
-
setTreeLayer
- Parameters:
treeLayer
- TheIUniqueIndexLayer
that should be used to retrieve config labels for a column. Needed to be able to determine if the column which is used for sorting is the tree column. Can benull
which avoids specialized handling of tree / non tree columns.
-
setDataLayer
- Parameters:
dataLayer
- TheGroupByDataLayer
that should be used to retrieve groupBy summary values for sorting the tree structure. Can benull
to avoid retrieving and inspecting summary values on sorting.
-
clearCache
void clearCache()For performance reasons theIGroupByComparator
might cache several information e.g. retrieved viaGroupByDataLayer
. This method is intended to clear those cached informations to avoid memory leaks or sorting based on old information.
-