Implementing equals() and hashCode() in actors is not likely to break much. Actors can be passed as Tokens, there is
ActorToken is used in the Graph Transformation and the
Ptolemy Hierarchical Orthogonal Multi-Attribute Solver (PtHOMAS)
work.  I don't think adding equals() and hashCode() to actors will
affect ActorToken, but it could.

I say go for it.   Let me know if you have problems.


Richard Ware wrote:
  I assume then that I won't break the framework by writing equals()
and hashCode() in my actor (because some of my other code wants
to use them).

  Thanks, Christopher!

On Mon, Oct 27, 2008 at 12:40 PM, Christopher Brooks <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Richard,
    Actors usually don't have equals() and hashCode() methods.
    However, if you define a custom token, like, then the custom token should
    have equals() and hashCode() methods.


Christopher Brooks (cxh at eecs berkeley edu) University of California
Chess Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst Chess/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax: 510.642.2718            (office: 545Q Cory)
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480

Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to