/** * Inserts a value into the set. * * @param obj an <code>Object</code> value * @return true if the set was modified by the add operation */ public boolean add(Object obj) { int index = insertionIndex(obj); if (index < 0) { return false; // already present in set, nothing to add } Object old = _set[index]; _set[index] = obj; postInsertHook(old == null); return true; // yes, we added something }