/** * Adds a property and direction to the default sorting for this data * provider. If no default sorting has been defined, then the provided sort * order will be used as the default sorting. If a default sorting has been * defined, then the provided sort order will be used to determine the * ordering of items that are considered equal by the previously defined * default sorting. * <p> * The default sorting is used if the query defines no sorting. The default * sorting is also used to determine the ordering of items that are * considered equal by the sorting defined in the query. * * @see #setSortOrder(ValueProvider, SortDirection) * @see #addSortComparator(SerializableComparator) * * @param valueProvider * the value provider that defines the property do sort by, not * <code>null</code> * @param sortDirection * the sort direction to use, not <code>null</code> */ public default <V extends Comparable<? super V>> void addSortOrder( ValueProvider<T, V> valueProvider, SortDirection sortDirection) { addSortComparator(InMemoryDataProviderHelpers .propertyComparator(valueProvider, sortDirection)); }