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 TypeMethodDescriptionvoidFor performance reasons theIGroupByComparatormight cache several information e.g.voidsetDataLayer(GroupByDataLayer<T> dataLayer) voidsetSortModel(ISortModel sortModel) voidsetTreeLayer(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
ISortModelthat 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 benullwhich leads to a static tree structure that only allows sorting for leafs within groups.
-
setSortModel
- Parameters:
sortModel- TheISortModelthat 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 benullwhich leads to a static tree structure that only allows sorting for leafs within groups.
-
setTreeLayer
- Parameters:
treeLayer- TheIUniqueIndexLayerthat 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 benullwhich avoids specialized handling of tree / non tree columns.
-
setDataLayer
- Parameters:
dataLayer- TheGroupByDataLayerthat should be used to retrieve groupBy summary values for sorting the tree structure. Can benullto avoid retrieving and inspecting summary values on sorting.
-
clearCache
void clearCache()For performance reasons theIGroupByComparatormight 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.
-