com.vaadin.flow.component.grid.

Class GridSortOrder<T>

java.lang.Object
com.vaadin.flow.data.provider.SortOrder<Grid.Column<T>>
com.vaadin.flow.component.grid.GridSortOrder<T>

Type Parameters:

T - the grid type

All Implemented Interfaces:

Serializable

public class GridSortOrder<T> extends SortOrder<Grid.Column<T>>

Sorting information for Grid.

See Also:

  • Constructor Details

    • GridSortOrder

      public GridSortOrder(Grid.Column<T> column, SortDirection direction)

      Construct sorting information for usage in a Grid.

      Parameters:

      column - the column to be sorted

      direction - sorting direction

  • Method Details

    • getSorted

      public Grid.Column<T> getSorted()

      Gets the column this sorting information is attached to.

      Overrides:

      getSorted in class 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

    • equals

      public boolean equals(Object obj)

      Overrides:

      equals in class Object

    • hashCode

      public int hashCode()

      Overrides:

      hashCode in class Object