[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use a comparator?



Hi Neil,

Since the application is running in a client-server environment returning a 
TreeSet may raise some issues. For example, as I understand the scenario 
that you describe, the TreeSet object will exist on the client and changes 
to the set (i.e. set membership) will not be reflected on the server.

Perhaps if you could share something about the requirements that led to your 
design decision to return a TreeSet the issues can be resolved more readily.

What is the cardinality of the sets? Will the sets be updated? Will  set 
member attributes involved in the sorting be updated? How will the set be 
used? e.g. Values are displayed and members selected in a GUI.

cheers,

don


>Don:
>
>Thanks for the information, it really helped.
>
>Here is the problem:  When my Impl object implements
>Comparable, the Proxy object that is generated does
>not (Is this is a bug in OPP?).
>
>I am trying to return a TreeSet of proxy objects
>to the client.
>
>But, the proxy objects are not Comparables and therefore
>I get an exception.
>
>If I manually edit the Proxy.java file and make it implement
>the Comparator interface, everything works fine.
>
>Thanks,
>	Neil.

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com