01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.geoserver.wfs;
06:
07: import java.util.Comparator;
08:
09: /**
10: * Compares transaction plugins based on the priority field.
11: * @author Administrator
12: *
13: */
14: public class TransactionPluginComparator implements Comparator {
15: public int compare(Object o1, Object o2) {
16: TransactionPlugin t1 = (TransactionPlugin) o1;
17: TransactionPlugin t2 = (TransactionPlugin) o2;
18:
19: // high priority number -> earlier in the sorting
20: return t2.getPriority() - t1.getPriority();
21: }
22: }
|