Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 EPL Esper 编写选择查询,我需要根据存储在 java 集中的对象的信息添加 where 子句。
myCalss2{ int prop1; String prop2; } class myClass{ int someFiled; boolean foo; Set<myClass2> bar; }
我需要比较 prop2 的值,但我得到了 myClass 的实例,如何获取 prop2 的值?
所以“myClass”确实有多个“prop2”值。
Esper 提供了枚举方法(又名 lambda funcs),所以这样的东西可以工作:“bar.anyOf(v => v.prop2 = 'some value')”
请参阅http://esper.codehaus.org/esper-4.10.0/doc/reference/en-US/html_single/index.html#enumerationreference
EPL 中的示例:“select * from MyClass(bar.anyOf(v => v.prop2 = 'some value'))”