Returns a Map representing the contents of the given CompositeData. - * Each item in the CompositeData is represented by an entry in the map, - * where the name and value of the item are the key and value of the entry. - * The returned value is modifiable but modifications to it have no effect - * on the original CompositeData.
- * - *For example, if you have a CompositeData {@code cd1} and you want - * to produce another CompositeData {@code cd2} which is the same except - * that the value of its {@code id} item has been changed to 253, you - * could write:
- * - *- * CompositeData cd1 = ...; - * {@code Map- * - *} map = CompositeDataSupport.toMap(cd1); - * assert(map.get("id") instanceof Integer); - * map.put("id", 253); - * CompositeData cd2 = {@link #CompositeDataSupport(CompositeType, Map) - * new CompositeDataSupport}(cd1.getCompositeType(), map); - *
Logically, this method would be a method in the {@link CompositeData} - * interface, but cannot be for compatibility reasons.
- * - * @param cd the CompositeData to convert to a Map. - * - * @return a Map that is a copy of the contents of {@code cd}. - * - * @throws IllegalArgumentException if {@code cd} is null. - * - * @see #CompositeDataSupport(CompositeType, Map) - */ - public static MapCompositeDataSupport
instance for equality.
*