Package org.adempiere.webui.util
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 comparator, adapted from MSort- Author:
- hengsin
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SortComparator(int columnIndex, boolean ascending, Language language)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Object o1, Object o2)
Compare Data of two entitiesint
getColumnIndex()
void
setSortAsc(boolean ascending)
Sort Ascending-
Methods 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 Detail
-
SortComparator
public SortComparator(int columnIndex, boolean ascending, Language language)
- Parameters:
columnIndex
-ascending
-language
-
-
-
Method Detail
-
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 interfaceComparator<Object>
- Parameters:
o1
- objecto2
- object- Returns:
- comparator
-
getColumnIndex
public int getColumnIndex()
-
-