eu.geclipse.ui.providers
Class GridModelComparator
java.lang.Object
eu.geclipse.ui.providers.GridModelComparator
- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator<java.lang.Object>
public class GridModelComparator
- extends java.lang.Object
- implements java.util.Comparator<java.lang.Object>, java.io.Serializable
Comparator implementation for sorting elements within
the Grid model.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
GridModelComparator
public GridModelComparator()
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Specified by:
compare in interface java.util.Comparator<java.lang.Object>
compare
public int compare(IGridElement e1,
IGridElement e2)
- Compare the specified elements.
- Parameters:
e1 - The first element.e2 - The second element.
- Returns:
- The return value is calculated in order to prefer folders
before files. If both elements are either folders or files the names
of the elements are compared.