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.
为什么这不起作用?
shareholders*.metaClass.editing = false;
但这有吗?
shareholders.collect{it.metaClass.editing = false}
您不能在 groovy 中以这种方式分配多个值,[1, 2, 3] = 4也不起作用
[1, 2, 3] = 4
除非你需要一个列表,否则你false最好使用each而不是collect
false
each
collect