public static <T> ArrayList<T> array_values(Map<?, T> m) {
		// OK
		ArrayList<T> output = new ArrayList<T>();
		if (m == null) return output;
		int i = 0;
		synchronized(m) {
			for (Map.Entry<?,T> entry : m.entrySet()) {
				T value = entry.getValue();
				output.add(i,value);
				i++;
			}
		}
		return output;
	}