RE: JESS: Implementing equals() and hashCode()

2004-08-04 Thread Keith Donald
You might also want to check out the work by the apache software foundation; specifically, their Jakarta commons product, the commons-lang module. Commons-lang has a number of classes -- builders -- to assist in building properly formatted equals, hashCode, and toString() methods. Keith -Orig

RE: JESS: Implementing equals() and hashCode()

2004-08-04 Thread Jason Morris
Small world -- the javapractices link cross references the same book that Ernest mentions on the subject: - Implementing hashCode() "...The following utility class allows simple construction of an effective hashCode method. It is based on the recommendations of Effective Jav

Re: JESS: Questions

2004-08-04 Thread ejfried
I think Mehta, Chirag (IT) wrote: > Sorry, One more thing, > > Is there anyway of setting a rule to check after all the facts have been > asserted??? > > A rule with a low salience will fire according to whats on the agenda at > the current time. I require to check whether or not, after all the f

RE: JESS: Questions

2004-08-04 Thread Mehta, Chirag (IT)
Sorry, One more thing, Is there anyway of setting a rule to check after all the facts have been asserted??? A rule with a low salience will fire according to whats on the agenda at the current time. I require to check whether or not, after all the facts have been asserted, whether or not a certai

RE: JESS: Questions

2004-08-04 Thread Mitch Christensen
1) You can use defquery and count-query-results. 2) Facts that have contributed to activations are still available for regular pattern matching (i.e. your other, non-activated rule will still consider facts that support existing activation records). If you are trying to find a way to compare a f

Re: JESS: Questions

2004-08-04 Thread ejfried
I think Mehta, Chirag (IT) wrote: > Hello, > > I have a few more questions. Hopefully, these aren't as simple as my > previous ones. > > Firstly, is there a simple way of checking how many facts have a > particular slot value?? As you said, a query with count-query-results is one good way. The

RE: JESS: Questions

2004-08-04 Thread Mehta, Chirag (IT)
Sorry, got one answer, count-query-results!     From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mehta, Chirag (IT)Sent: 04 August 2004 13:39To: [EMAIL PROTECTED]Subject: JESS: Questions Hello,   I have a few more questions. Hopefully, these aren't as simple as my previous

JESS: Questions

2004-08-04 Thread Mehta, Chirag (IT)
Hello,   I have a few more questions. Hopefully, these aren't as simple as my previous ones.   Firstly, is there a simple way of checking how many facts have a particular slot value??   Also, I need to check whether a particular slot value, of any already activated fact, is less than the co

JESS: Implementing equals() and hashCode()

2004-08-04 Thread Mitch Christensen
FWIW, I have dealt quite effectively with this situation using the following two references and the associated utility classes: http://www.javapractices.com/Topic17.cjp http://www.javapractices.com/Topic28.cjp I was able to address some serious bugs I had using the Hibernate O/R mapping framewor