6263646566676869707172737475
* @param map * Keys may be Keys or Strings (which will be converted to Keys) */ public Properties(Map map) { for (Object k : map.keySet()) { Key key; if (k instanceof Key) { key = (Key) k; } else { key = new Key((String) k); } put(key, map.get(k)); } }
808182838485868788
* @param keyValuePairs */ public Properties(Object... keyValuePairs) { assert keyValuePairs.length % 2 == 0 : keyValuePairs; for (int i = 0; i < keyValuePairs.length; i += 2) { Key key = (Key) keyValuePairs[i]; put(key, keyValuePairs[i + 1]); } }