Class GridSortOrder<T>

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

    public class GridSortOrder<T>
    extends com.vaadin.flow.data.provider.SortOrder<Grid.Column<T>>
    Sorting information for Grid.
    See Also:
    Serialized Form
    • Constructor Detail

      • GridSortOrder

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

      • getSorted

        public Grid.Column<T> getSorted()
        Gets the column this sorting information is attached to.
        Overrides:
        getSorted in class com.vaadin.flow.data.provider.SortOrder<Grid.Column<T>>
        Returns:
        the column being sorted
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object