static Map putKeysFirst(Map map, O... keys) { Map m2 = litorderedmap(); Map remaining = cloneMap(map); for (O key : keys) { O value = remaining.get(key); if (value != null) { m2.put(key, value); remaining.remove(key); } } m2.putAll(remaining); ret m2; }