📄 not_rule_test.drl
字号:
package org.drools.test;
import org.drools.Cheese;
global java.util.List list;
rule "not rule test"
salience 10
when
not Cheese( price == 5 )
then
list.add( new Integer( 5 ) );
end
rule "not rule with bound variable"
when
not Cheese( $price:price -> ( $price.intValue() == 5 ) )
then
list.add( new Integer( 6 ) );
end
rule "not rule with other columns 1"
when
Cheese( $type : type == "cheddar" )
not Cheese( price == 5 )
then
list.add( new Integer( 7 ) );
end
rule "not rule with other columns 2"
when
not Cheese( price == 5 )
Cheese( $type : type == "cheddar" )
then
list.add( new Integer( 8 ) );
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -