public static <A> List<A> sort(Collection<A> col, final String attr, final boolean desc) {
		if (col==null) {
			return null;
		}
		ArrayList<A> list = new ArrayList<A>(col);
		if (list.size() < 2) {
			return list;
		}
		
		final F1<A,Comparable> getter;
		if (Map.class.isInstance(list.get(0))) {
			getter = new F1<A, Comparable>() {public Comparable e(A obj) {
				return (Comparable) ((Map)obj).get(attr);
			}};
		} else {
			Class<? extends Object> clazz = list.get(0).getClass();
			
			final Field field = ReflectUtil.getField(attr, clazz);
			getter = new F1<A,Comparable>() {public Comparable e(A obj) {
				return (Comparable) ReflectUtil.getFieldValue(field, obj);
			}};
		}
		
		Collections.sort(list, new Comparator<A>() {
			public int compare(A a, A b) {
				return getter.e(a).compareTo(getter.e(b)) * (desc ? -1 : 1);
			}
		});
		return list;
	}