168169170171172173174175176177178179180181
public <T> Map<Key<T>, T> put(Iterable<? extends T> objs) { Map<Key<T>, T> map = new HashMap<Key<T>, T>(); Persister persister = new Persister(base, factory); for (T obj : objs) { persister.persiste(obj); Key<T> key = factory.getKey(obj); map.put(key, obj); } return map;
185186187188189190191192
public <T extends Object> Map<Key<T>, T> put(T... objs) { return put(Arrays.asList(objs)); } public <T extends Object> Key<T> put(T obj) { new Persister(base, factory).persiste(obj); return factory.getKey(obj); };