Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] JFace Generics

On 08/29/2013 06:51 PM, Ed Merks wrote:
    public E[] getElements(I inputElement) {
       return (E[])inputElement.toArray();
   }

I may have missed something, but wouldn't the following implementation be a valid solution?

public E[] getElements(I inputElement) {
   return inputElement.toArray(new E[inputElement.size()]);
}
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top