static TreeMap asTreeMap(Map map) { ret map instanceof TreeMap ? (TreeMap) map : map == null ? new TreeMap : new TreeMap(map); }