/** * @param array the array into which the elements of the list are to be stored, if it is big enough; otherwise, a * new array of the same runtime type is allocated for this purpose. * @return an array containing the product nodes, never <code>null</code>, but the array can have zero length */ public T[] toArray(T[] array) { return nodeList.toArray(array); }
/** * Returns an array of all products currently managed. * * @return an array containing the products, never <code>null</code>, but the array can have zero length */ public ProductNode[] toArray() { return nodeList.toArray(); }
/** * Returns an array of all products currently managed. * * @return an array containing the products, never <code>null</code>, but the array can have zero length */ public Product[] getProducts() { return productList.toArray(new Product[getProductCount()]); }
if (metadataRoot != null) { final MetadataElement[] elementsArray = new MetadataElement[metadataElementBackup.size()]; metadataElementBackup.toArray(elementsArray); for (final MetadataElement metadataElement : elementsArray) { metadataRoot.addElement(metadataElement);
public void testToArray() { addAllNodes(); ProductNode[] nodes = _nodeList.toArray(); assertEquals(nodes[0], _attribute1); assertEquals(nodes[1], _attribute2); assertEquals(nodes[2], _attribute3); assertEquals(nodes[3], _attribute4); removeAllNodes(); }