public static interface Proxy.AttributesRO extends AttributesRO
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends Convertible> |
findValues(groovy.lang.Closure<java.lang.Boolean> closure)
returns the values of all attributes for which the closure returns true.
|
containsKey, findAttribute, findFirst, findValues, get, get, getAll, getAttributeNames, getFirst, getKey, getMap, getNames, getTransformed, getValues, isEmpty, size
java.util.List<? extends Convertible> findValues(groovy.lang.Closure<java.lang.Boolean> closure)
Convertible
enables conversion. The following formula sums all attributes
whose names are not equal to 'TOTAL':
= attributes.findValues{key, val -> key != 'TOTAL'}.sum(0){it.num0}
closure
- A closure that accepts two arguments (String key, Object value) and returns boolean/Boolean.