String[] valueArray = new String[values.size()]; valueArray = (String[]) values.toArray(valueArray);
DCValue[] valueArray = new DCValue[values.size()]; valueArray = (DCValue[]) values.toArray(valueArray);
    public String[] getDC(String element, String qualifier, String lang)    {        // Build up list of matching values        List values = new ArrayList();        Iterator i = dublinCore.iterator();                while (i.hasNext())        {            DCValue dcv = (DCValue) i.next();                        if (match(element, qualifier, lang, dcv))            {                values.add(dcv.value);            }        }        // Create an array of matching values        String[] valueArray = new String[values.size()];        valueArray = (String[]) values.toArray(valueArray);        return valueArray;    }