coll
coll:contains
boolean coll:contains(Collection collection, Object element)
Checks whether a collection contains a given element:
#{coll.contains(out.appl.members, 'myApplication'}
Deprecated name: ctx:contains
coll:isEmpty
boolean coll:isEmpty(Collection collection)
Checks whether the given collection is empty.
#{coll:isEmpty(out.appl.members)}
Deprecated name: ctx:isEmpty
coll:size
int coll:size(Collection collection)
Gets the size of a collection.
#{coll:size(out.appl.members)}
coll:expand
Collection<Map> coll:expand(Collection<Map> collection, String key)
Expands the value of key for each map in the collection.
#{coll:expand(cfg.users, 'groups')}
given:
cfg.users := [ { name = 'joe bloggs', groups = [ 'admin', 'tester'] } ]
the result will be:
[
{ name = 'joe bloggs', groups = 'admin' }
{ name = 'joe bloggs', groups = 'tester' }
]
coll:unique
Collection<?> coll:unique(Collection<?> collection)
Removes duplicates from a collection. If the entries are maps, all key-value pairs have to match.
#{coll:unique(cfg.users)}