I have two comments.

First, I think there should be two interfaces, one that only supports
getValue(), and another that inherits from the first and adds
setValue(T).  I'll let someone else bikeshed over whether HasValue
should be the ancestor or descendant.  The benefit here is that you
can plug into the HasValue architecture without being forced into the
corner of supporting arbitrary updates to your data.

Second, I think setValue(T) should be allowed to throw an exception.
I'd argue for either a new subclass of IllegalArgumentException, or
for a checked exception.  I'm not sure whether I prefer a checked or
unchecked exception.

Ian

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to