Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.49 KB

get-map.md

File metadata and controls

27 lines (19 loc) · 1.49 KB

subkt / myaa.subkt.tasks / Subs / getMap

getMap

fun getMap(keys: String, values: String): Map<String, List<String>!> (source)

Constructs a map by looking up [keys](get-map.md#myaa.subkt.tasks.Subs$getMap(kotlin.String, kotlin.String)/keys) in the properties, taking its values to be the keys of the map, and then for each such key, looking up the property with the key as its entry and [values](get-map.md#myaa.subkt.tasks.Subs$getMap(kotlin.String, kotlin.String)/values) as its property name, and taking the value of that property to be the value associated with that key.

Consider e.g. a properties file containing:

batches=vol{1..3}
vol1.episodes={01..04}
vol2.episodes={05..08}
vol3.episodes={09..12}

Calling getMap("batches", "episodes") would return the following map:

{vol1=[01, 02, 03, 04], vol2=[05, 06, 07, 08], vol3=[09, 10, 11, 12]}