01: package org.conform;
02:
03: import java.util.*;
04: import java.io.Serializable;
05:
06: public class DefaultPropertySorter implements Comparator, Serializable {
07: public static final Comparator INSTANCE = new DefaultPropertySorter();
08:
09: public int compare(Object o1, Object o2) {
10: PropertyMeta p1 = (PropertyMeta) o1;
11: PropertyMeta p2 = (PropertyMeta) o2;
12: return p1.getPriority() - p2.getPriority();
13: }
14: }
|