Class Sort


  • public class Sort
    extends Object
    Fluid Sort descriptor object.
    Since:
    7.4
    Author:
    Vaadin Ltd
    • Method Detail

      • by

        public static Sort by​(Grid.Column<?,​?> column)
        Start building a Sort order by sorting a provided column in ascending order.
        Parameters:
        column - a grid column object reference
        Returns:
        a sort instance, typed to the grid data type
      • by

        public static Sort by​(Grid.Column<?,​?> column,
                              SortDirection direction)
        Start building a Sort order by sorting a provided column.
        Parameters:
        column - a grid column object reference
        direction - indicator of sort direction - either ascending or descending
        Returns:
        a sort instance, typed to the grid data type
      • then

        public Sort then​(Grid.Column<?,​?> column)
        Continue building a Sort order. The provided column is sorted in ascending order if the previously added columns have been evaluated as equals.
        Parameters:
        column - a grid column object reference
        Returns:
        a sort instance, typed to the grid data type
      • then

        public Sort then​(Grid.Column<?,​?> column,
                         SortDirection direction)
        Continue building a Sort order. The provided column is sorted in specified order if the previously added columns have been evaluated as equals.
        Parameters:
        column - a grid column object reference
        direction - indicator of sort direction - either ascending or descending
        Returns:
        a sort instance, typed to the grid data type
      • build

        public List<SortOrder> build()
        Build a sort order list. This method is called internally by Grid when calling com.vaadin.client.ui.grid.Grid#sort(Sort), but can also be called manually to create a SortOrder list, which can also be provided directly to Grid.
        Returns:
        a sort order list.