View Single Post
  #5 (permalink)  
Old 01-07-2008, 11:11 PM
bluekswing bluekswing is offline
Member
 
Join Date: Jun 2007
Posts: 14
bluekswing is on a distinguished road
Hmm interesting....I"ll have to read up more on expression parsing.


Essentially I have an object that has 50 variables either of type String or type int. Everyday I want to be able to run a test on the object's instance variables based on a set of conditions. These conditions can change from day to day.

All the rules will be of an "if- then" format. So,

//If variable1 = variable2 then add 1 to total sum
//If variable8 > variable3 then add 2 to total sum
//If variable23 >= variable27 then subtract 0.5 from total sum
//If variable19.equals(variable5) then add 0.25 to total sum


So essentially every rule will contain some comparison between two variables where any of the following equality conditions apply: (> , < , = (.equals) , != , =<, >=)



The stumbling block for me is how to create these rule objects.......
Reply With Quote