/** * Converts each value from the specified map to a member of an array of {@link CompositeData} * values and adds them using {@link #put(CompositeData[])}, if possible. As in {@link * #put(Object,Object)}, the keys are simply ignored. This method is useful for adding the {@link * CompositeData} values from a different {@link TabularData} instance, which uses the same {@link * TabularType} but a different selection of index names, to this one. If the map is <code>null * </code> or empty, the method simply returns. * * @param m the map to add. Only the values are used and must all be instances of {@link * CompositeData}. * @throws NullPointerException if a value from the map is <code>null</code>. * @throws ClassCastException if a value from the map is not an instance of {@link CompositeData}. * @throws InvalidOpenTypeException if the type of the given value does not match the row type. * @throws KeyAlreadyExistsException if the value has the same calculated index as an existing * value or of one of the other specified values. */ public void putAll(Map<?, ?> m) { if (m == null || m.size() == 0) return; Collection<?> vals = m.values(); CompositeData[] data = new CompositeData[vals.size()]; Iterator<?> it = vals.iterator(); for (int a = 0; it.hasNext(); ++a) { data[a] = (CompositeData) it.next(); } putAll(data); }