/** * Store an object for future lookup. * <p> * An existing mapping for <b>must not</b> be in this map. Callers must * first call {@link #get(AnyObjectId)} to verify there is no current * mapping prior to adding a new mapping, or use * {@link #addIfAbsent(ObjectId)}. * * @param newValue * the object to store. */ public <Q extends V> void add(Q newValue) { if (++size == grow) grow(); insert(newValue); }
grow(); insert(newValue); } else {
/** * Store an object for future lookup. * <p> * An existing mapping for <b>must not</b> be in this map. Callers must * first call {@link #get(AnyObjectId)} to verify there is no current * mapping prior to adding a new mapping, or use * {@link #addIfAbsent(ObjectId)}. * * @param newValue * the object to store. */ public <Q extends V> void add(Q newValue) { if (++size == grow) grow(); insert(newValue); }
/** * Store an object for future lookup. * <p> * An existing mapping for <b>must not</b> be in this map. Callers must * first call {@link #get(AnyObjectId)} to verify there is no current * mapping prior to adding a new mapping, or use * {@link #addIfAbsent(ObjectId)}. * * @param newValue * the object to store. * @param <Q> * type of instance to store. */ public <Q extends V> void add(final Q newValue) { if (++size == grow) grow(); insert(newValue); }
grow(); insert(newValue); } else {
grow(); insert(newValue); } else {