Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.43 KB

get-list-as.md

File metadata and controls

24 lines (16 loc) · 1.43 KB

subkt / myaa.subkt.tasks / Subs / getListAs

getListAs

inline fun <reified T> getListAs(propertyName: String, entry: String= "", context:AbstractContext? = null): Provider<List<T>!>! (source)

Searches for the given property in the Subs object's SubProperties instance, evaluates its value using evaluate, and casts the list elements to the given type using String.asType.

This function is run outside of a task context, using only release for lookup unless an entry is manually specified.

// property file: TV.*.values={1..5}
getListAs<Int>("values")
// Output: [1, 2, 3, 4, 5] (type: List<Int>)

Parameters

propertyName - The property to find.

entry - Optional manually specified entry for property lookup.