Parameterize ListView, TableView and TreeView getters and setters for ListData
------------------------------------------------------------------------------

                 Key: PIVOT-770
                 URL: https://issues.apache.org/jira/browse/PIVOT-770
             Project: Pivot
          Issue Type: Improvement
    Affects Versions: 2.0
            Reporter: Edvin Syse
            Priority: Minor
             Fix For: 2.0.1


Firstly, please forgive me if I use incorrect terms, I'm no generics expert :)

I'll use TableView#getTableData() as an example. This method is today 
anonymously typed, so that if you want to mutate the list, you need to cast it 
to a spesific type first. This can easily be fixed by parameterizing the 
method. The same goes for ListView and TreeView as well. I'll supply a patch to 
change this behavior. This removes an annoyance and enables better looking code.

This is how one need to do it today:

List<MyObject> myList = (List<MyObject>) tableView.getTableData();
myList.add(myObject);

By parameterizing the methods, this changes to:

tableView.getTableData().add(myObject);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to