Revision 389
Added by Matt Jones over 24 years ago
src/edu/ucsb/nceas/metacat/NodeComparator.java | ||
---|---|---|
31 | 31 |
} |
32 | 32 |
|
33 | 33 |
/** |
34 |
* compare two objects to determine proper sort order |
|
34 |
* compare two objects to determine proper sort order -- delegates to |
|
35 |
* the compare(NodeRecord, NodeRecord) method. |
|
35 | 36 |
*/ |
36 | 37 |
public int compare(Object o1, Object o2) { |
37 | 38 |
return compare((NodeRecord)o1, (NodeRecord)o2); |
... | ... | |
45 | 46 |
* its parentnodeid is greater, or if its parentnodeid is equal and |
46 | 47 |
* its nodeindex is greater. |
47 | 48 |
*/ |
48 |
private int compare(NodeRecord o1, NodeRecord o2) {
|
|
49 |
public int compare(NodeRecord o1, NodeRecord o2) {
|
|
49 | 50 |
if (o1.nodeid == o2.nodeid) { |
50 | 51 |
return EQUALS; |
51 | 52 |
} else if (o1.parentnodeid < o2.parentnodeid) { |
Also available in: Unified diff
Updated documentation for NodeComparator.java.