在我们的 ILOG 规则 irl 文件中,我们多次从集合中设置变量并从集合中设置另一个不等于第一个对象的变量
student1: com.company.bom.Student() in all_students;
student2: com.company.bom.Student(!(?this.equals(student2))) in all_students;
在 ILOG 中,这些行是否只返回集合中的第一个和第二个对象?
以下是在 Drol 规则文件中的 Drools 中执行相同操作的最佳方法吗?
student1: com.company.bom.Student() from all_students.get(0);
student2: com.company.bom.Student() from all_students.get(1);