Barracuda: Patch for IterativeListModel

Stefan Armbruster <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi,

IterativeListModel uses internally a List. The only operation called
upon this is iterator(). Since List extends Collection, it is sufficient
to use Collection instead of List inside IterativeListModel.
The attached patch solves this.

There's no need to modify any code that uses IterativeListModel, only a
recompile is necessary.

The benefit from this is, you can pass e.g. Set to IterativeListModel.

Regards,
Stefan
IterativeListModel.java.patch (text/plain, 376 B)
45c45
< 	private Collection _models;
---
> 	private List _models;
61c61
< 	public IterativeListModel(String name, Collection models) {
---
> 	public IterativeListModel(String name, List models) {
108c108
< 	public Collection getModels() {
---
> 	public List getModels() {
118c118
< 	public void setModels(Collection arg_models){
---
> 	public void setModels(List arg_models){
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.