/** * Remove all but the specified keys from this map. * * <p> * This does not affect the underlying map. * * @param keys The remaining keys in the map (in the specified order). */ public void filterKeys(List<String> keys) { ObjectMap m2 = new ObjectMap(); for (String k : keys) m2.put(k, get(k)); this.clear(); this.putAll(m2); } }
/** * Remove all but the specified keys from this map. * * <p> * This does not affect the underlying map. * * @param keys The remaining keys in the map (in the specified order). */ public void filterKeys(List<String> keys) { ObjectMap m2 = new ObjectMap(); for (String k : keys) m2.put(k, get(k)); this.clear(); this.putAll(m2); } }
/** * Remove all but the specified keys from this map. * * <p> * This does not affect the underlying map. * * @param keys The remaining keys in the map (in the specified order). */ public void filterKeys(List<String> keys) { ObjectMap m2 = new ObjectMap(); for (String k : keys) m2.put(k, get(k)); this.clear(); this.putAll(m2); } }