Package org.freeplane.plugin.script.proxy

# Interface Proxy.AttributesRO

All Superinterfaces:
  `AttributesRO`

All Known Subinterfaces:
  `Proxy.Attributes`

Enclosing interface:
  `Proxy`

public static interface Proxy.AttributesRO extends AttributesRO

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<? extends Convertible>`
  `findValues(groovy.lang.Closure<Boolean> closure)`
  returns the values of all attributes for which the closure returns true.

  ### Methods inherited from interface org.freeplane.api.AttributesRO

  `containsKey, findAttribute, findFirst, findValues, get, get, getAll, getAttributeNames, getFirst, getKey, getMap, getNames, getTransformed, getValues, isEmpty, size`

- ## Method Details

  - ### findValues

    List<? extends Convertible> findValues(groovy.lang.Closure<Boolean> closure)
    returns the values of all attributes for which the closure returns true. The fact that the values are returned as a list of `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}

    Parameters:
      `closure` - A closure that accepts two arguments (String key, Object value) and returns boolean/Boolean.
    Returns:
      the values of all attributes for which the closure returns true.
    Since:
      1.2