Class GridSortOrder<T>

  • Type Parameters:
    T - the grid type
    All Implemented Interfaces:
    java.io.Serializable

    public class GridSortOrder<T>
    extends SortOrder<Grid.Column<T,​?>>
    Sorting information for Grid.
    Since:
    8.0
    See Also:
    Serialized Form
    • Constructor Detail

      • GridSortOrder

        public GridSortOrder​(Grid.Column<T,​?> column,
                             com.vaadin.shared.data.sort.SortDirection direction)
        Construct sorting information for usage in a Grid.
        Parameters:
        column - the column to be sorted
        direction - sorting direction
    • Method Detail

      • asc

        public static <T> GridSortOrderBuilder<T> asc​(Grid.Column<T,​?> by)
        Creates a new grid sort builder with given sorting using ascending sort direction.
        Type Parameters:
        T - the grid type
        Parameters:
        by - the column to sort by
        Returns:
        the grid sort builder
      • desc

        public static <T> GridSortOrderBuilder<T> desc​(Grid.Column<T,​?> by)
        Creates a new grid sort builder with given sorting using descending sort direction.
        Type Parameters:
        T - the grid type
        Parameters:
        by - the column to sort by
        Returns:
        the grid sort builder