mapByParentUid

fun <O : ObjectWithUidInterface> mapByParentUid(objects: Collection<O>, parentExtractor: Transformer<O, String>): Map<String, List<O>>

Map a Collection with the a custom key extracted from the parentExtractor.

Return

A Map with a custom parent as key of the objects from the collection.

Parameters

objects

A collection of objects with uid.

parentExtractor

A Transformer that extracts the parent property of the object.