Hi All,
How do i pattern match on string constants? or any constants?
I have a class A {
public static final String STATE_DOWN = "down";
public static final String STATE_UP = "up";
public String getState();
public void setState(String state);
}
now i want to pattern match like this
(defrule foo
(A (OBJECT ?obj) (state A.STATE_DOWN))
=>
.......
)
Is that valid? Or i have to use some thing like
(defrule foo
(A (OBJECT ?obj) (state ?state))
(test (str-compare ?state A.STATE_DOWN))
=>
.....
)
Thanks in Advance
Satish Boggavarapu
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------