Package org.adempiere.webui.util
Class SortComparator
java.lang.Object
org.adempiere.webui.util.SortComparator
- All Implemented Interfaces:
Serializable
,Comparator<Object>
Default sort comparator, adapted from MSort
- Author:
- hengsin
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compare Data of two entitiesint
Get column indexvoid
setSortAsc
(boolean ascending) Sort AscendingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
SortComparator
- Parameters:
columnIndex
-ascending
-language
-
-
-
Method Details
-
setSortAsc
public void setSortAsc(boolean ascending) Sort Ascending- Parameters:
ascending
- if true sort ascending
-
compare
Compare Data of two entities- Specified by:
compare
in interfaceComparator<Object>
- Parameters:
o1
- objecto2
- object- Returns:
- comparator
-
getColumnIndex
public int getColumnIndex()Get column index- Returns:
- column index
-