svn-gvsig-desktop / trunk / prototypes / mobile / desktop / extensions / extExportMobile / src / es / prodevelop / gvsig / exportMobile / ui / order / LayerNamesComparator.java @ 19124
History | View | Annotate | Download (608 Bytes)
1 |
package es.prodevelop.gvsig.exportMobile.ui.order; |
---|---|
2 |
|
3 |
import java.util.Comparator; |
4 |
|
5 |
public class LayerNamesComparator implements Comparator { |
6 |
|
7 |
public LayerNamesComparator() {}
|
8 |
|
9 |
public int compare(Object arg0, Object arg1) { |
10 |
|
11 |
if ((arg0 instanceof FLayerWithNewName) && (arg0 instanceof FLayerWithNewName)) { |
12 |
|
13 |
FLayerWithNewName a0 = (FLayerWithNewName) arg0; |
14 |
FLayerWithNewName a1 = (FLayerWithNewName) arg1; |
15 |
return a0.getNewNameNoDiff().compareToIgnoreCase(a1.getNewNameNoDiff());
|
16 |
|
17 |
} else {
|
18 |
|
19 |
return arg0.toString().compareTo(arg1.toString());
|
20 |
|
21 |
} |
22 |
} |
23 |
|
24 |
} |