Skip to main content

API-issue: removeAll() is perhaps missing in ListModel-interface

4 replies [Last post]
dariuskatz
Offline
Joined: 2003-07-16

The ListModel-interface does not have the method removeAll() in contrast to the class DefaultListModel which indeed has it. This might have been in its order (even though I can see a need for removeAll() in the ListModel-interface) if the LWUIT document (the pdf called Developer's Guide) hadn't implied that it is part of the ListModel-interface. In chapter "3.4 Adding Items to and Removing Items From a List" the following can be read:

"To remove an item or all items from a List, use removeItem(int index) or removeAll() methods."

No mention is made that this is specific to DefaultListModel and consequently the ListModel-interface is implied.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Chen Fishbein

Hi,
This is a minor bug in the developer guide, rather then an API issue.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> The ListModel-interface does not have the method removeAll() in contrast to the class DefaultListModel which indeed has it. This might have been in its order (even though I can see a need for removeAll() in the ListModel-interface) if the LWUIT document (the pdf called Developer's Guide) hadn't implied that it is part of the ListModel-interface. In chapter "3.4 Adding Items to and Removing Items From a List" the following can be read:
>
> "To remove an item or all items from a List, use removeItem(int index) or removeAll() methods."
>
> No mention is made that this is specific to DefaultListModel and consequently the ListModel-interface is implied.
> [Message sent by forum member 'dariuskatz' (dariuskatz)]
>
> http://forums.java.net/jive/thread.jspa?messageID=314766
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

dariuskatz
Offline
Joined: 2003-07-16

Many thanks for the reply.

I assume you mean that the ListModel-interface should not and will not contain the removeAll()-method. If it's possible I would appreciate to know why if that is the case.

Best regards,
Darius

Chen Fishbein

Hi,
We don't see a need to add these methods in the interface level, that
will require any implementer to add this methods.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> Many thanks for the reply.
>
> I assume you mean that the ListModel-interface should not and will not contain the removeAll()-method. If it's possible I would appreciate to know why if that is the case.
>
> Best regards,
> Darius
> [Message sent by forum member 'dariuskatz' (dariuskatz)]
>
> http://forums.java.net/jive/thread.jspa?messageID=314985
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

dariuskatz
Offline
Joined: 2003-07-16

Fair enough. Thank you very much for taking the time to answer my questions.

Best regards,
Darius