com.vaadin.ui.components.grid.SortOrderProvider Maven / Gradle / Ivy
/*
* Copyright (C) 2000-2024 Vaadin Ltd
*
* This program is available under Vaadin Commercial License and Service Terms.
*
* See for the full
* license.
*/
package com.vaadin.ui.components.grid;
import java.util.stream.Stream;
import com.vaadin.data.provider.QuerySortOrder;
import com.vaadin.server.SerializableFunction;
import com.vaadin.shared.data.sort.SortDirection;
import com.vaadin.ui.Grid.Column;
/**
* Generates the sort orders when rows are sorted by a column.
*
* @see Column#setSortOrderProvider
*
* @since 8.0
* @author Vaadin Ltd
*/
@FunctionalInterface
public interface SortOrderProvider
extends SerializableFunction> {
/**
* Generates the sort orders when rows are sorted by a column.
*
* @param sortDirection
* desired sort direction
*
* @return sort information
*/
@Override
public Stream apply(SortDirection sortDirection);
}