01: /*
02: * Created on 14 Dec 2006
03: */
04: package uk.org.ponder.rsf.template;
05:
06: import java.util.Comparator;
07:
08: /** Compares two XMLLumps for their relative order of appareance in a template */
09:
10: public class XMLLumpComparator implements Comparator {
11: private static final Comparator instance = new XMLLumpComparator();
12:
13: public static final Comparator instance() {
14: return instance;
15: }
16:
17: public int compare(Object o1, Object o2) {
18: return ((XMLLump) o1).lumpindex - ((XMLLump) o2).lumpindex;
19: }
20: }
|