/** * Adds all of the elements in <tt>array</tt> to the set. * * @param array an <code>array</code> of double primitives. * @return true if the set was modified by the add all operation. */ public boolean addAll(double[] array) { boolean changed = false; for (int i = array.length; i-- > 0;) { if (add(array[i])) { changed = true; } } return changed; }
/** * Inserts a value into the set. * * @param true if the set was modified by the insertion */ public boolean add(Object value) { return _set.add(unwrap(value)); }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = stream.readInt(); setUp(size); while (size-- > 0) { double val = stream.readDouble(); add(val); } } } // TDoubleHashSet
short category = categories.next(); double score = docScores.get(category).score; scores.get(category).add(score);