/** * Removes all of the elements in <tt>array</tt> from the set. * * @param array an <code>array</code> of double primitives. * @return true if the set was modified by the remove all operation. */ public boolean removeAll(double[] array) { boolean changed = false; for (int i = array.length; i-- > 0;) { if (remove(array[i])) { changed = true; } } return changed; }
/** * Removes any values in the set which are not contained in * <tt>array</tt>. * * @param array an <code>array</code> of double primitives. * @return true if the set was modified by the retain all operation */ public boolean retainAll(double[] array) { boolean changed = false; Arrays.sort(array); double[] set = _set; byte[] states = _states; for (int i = set.length; i-- > 0;) { if (states[i] == FULL && (Arrays.binarySearch(array,set[i]) < 0)) { remove(set[i]); changed = true; } } return changed; }
/** * Deletes a value from the set. * * @param value an <code>Object</code> value * @return true if the set was modified */ public boolean remove(Object value) { return _set.remove(unwrap(value)); }