在 MVEL2 表达式中,可以使用逻辑运算符'!'来表示不包含。具体地,使用'!'操作符对 containsAll 方法的结果取反即可表示不包含。例如:

!myList.containsAll(otherList)

上述表达式表示如果 myList 不包含 otherList 中的所有元素,则返回 true;否则返回 false。


原文地址: https://www.cveoy.top/t/topic/fLgs 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录