Return-Path: X-Original-To: apmail-pivot-user-archive@www.apache.org Delivered-To: apmail-pivot-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A6954A5D for ; Sat, 9 Jul 2011 18:48:48 +0000 (UTC) Received: (qmail 87474 invoked by uid 500); 9 Jul 2011 18:48:48 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 87447 invoked by uid 500); 9 Jul 2011 18:48:47 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 87439 invoked by uid 99); 9 Jul 2011 18:48:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 18:48:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.159.29.9] (HELO mailstore05.sysedata.no) (195.159.29.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 18:48:38 +0000 Received: from [95.34.243.130] (helo=[10.0.1.190]) by mailstore05.sysedata.no with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QfcZd-0005c2-MB for user@pivot.apache.org; Sat, 09 Jul 2011 20:48:17 +0200 Message-ID: <4E18A275.90100@syse.no> Date: Sat, 09 Jul 2011 20:48:21 +0200 From: SYSE | Edvin Organization: SYSE User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: user@pivot.apache.org Subject: Why is TableView#getTableData() typed as List? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I usually add a List of my domainObjects to the TableView on initialization, and then later add objects on the fly when more are created. Because of the typing on getTableData() however, I can't do: tableView.getTableData().add(myDomainObject). I have to cast the getTableData() to either an untyped List or a List and then perform the add. This is because of the following definition of the getTableData() method: public List getTableData() { } What good does the serve here? Sure, if TableView accepted a generic type argument that was used instead of ?, this would be super-handy, but now it just seems like an obstacle. I'm no generics expert, so I guess it is a good reason for this though? :) -- Edvin