Class SortComparator

java.lang.Object
org.adempiere.webui.util.SortComparator
All Implemented Interfaces:
Serializable, Comparator<Object>

public final class SortComparator extends Object implements Comparator<Object>, Serializable
Default sort comparator, adapted from MSort
Author:
hengsin
See Also:
  • Constructor Details

    • SortComparator

      public SortComparator(int columnIndex, boolean ascending, Language language)
      Parameters:
      columnIndex -
      ascending -
      language -
  • Method Details

    • setSortAsc

      public void setSortAsc(boolean ascending)
      Sort Ascending
      Parameters:
      ascending - if true sort ascending
    • compare

      public int compare(Object o1, Object o2)
      Compare Data of two entities
      Specified by:
      compare in interface Comparator<Object>
      Parameters:
      o1 - object
      o2 - object
      Returns:
      comparator
    • getColumnIndex

      public int getColumnIndex()
      Get column index
      Returns:
      column index