All pastes #626218 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-19 14:26 UTC
rendered paste body
			IConnectionMethod[] methods = (IConnectionMethod[]) connectionMethods.toArray(new IConnectionMethod[0]);
			Arrays.sort(methods, new Comparator(){
				public int compare(Object o1, Object o2) {
					if (o1 instanceof IConnectionMethod && o2 instanceof IConnectionMethod) {
						IConnectionMethod cm1 = (IConnectionMethod) o1;
						IConnectionMethod cm2 = (IConnectionMethod) o2;
						return cm1.getName().compareTo(cm2.getName());
					}
					return 0;
				}});
			pluggedInConnectionMethods = methods;