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