java.lang.Object
com.github.martincooper.datatable.sorting.SortItem

public final class SortItem extends Object
SortItem class. Used to perform table multi sorts. Created by Martin Cooper on 21/07/2017.
  • Constructor Details

    • SortItem

      public SortItem(String columnName)
      SortItem constructor. Identify by column name.
      Parameters:
      columnName - The column name.
    • SortItem

      public SortItem(String columnName, SortOrder sortOrder)
      SortItem constructor. Identify by column name.
      Parameters:
      columnName - The column name.
      sortOrder - The sort order.
    • SortItem

      public SortItem(Integer columnIndex)
      SortItem constructor. Identify by column index.
      Parameters:
      columnIndex - The column index.
    • SortItem

      public SortItem(Integer columnIndex, SortOrder sortOrder)
      SortItem constructor. Identify by column index.
      Parameters:
      columnIndex - The column index.
      sortOrder - The sort order.
  • Method Details

    • sortOrder

      public SortOrder sortOrder()
      Returns the sort order.
      Returns:
      Returns the sort order.
    • columnIdentity

      public com.github.martincooper.datatable.sorting.ColumnIdentity columnIdentity()
      Returns the column identity.
      Returns:
      Returns the column identity.
    • getColumn

      public io.vavr.control.Try<IDataColumn> getColumn(DataTable table)
      Returns the column from the table.
      Parameters:
      table - The table to get the column from.
      Returns:
      Returns the column.