otakusenpai
01/26/2020, 1:57 PMclass Usage(from: List<UsageArgument> = listOf(), val runsAt: List<RunAt> = listOf()) : List<UsageArgument> by from {
override fun toString(): String {
val result = joinToString(" ") { it.format() }
return if (result.isBlank()) "none" else result
}
}
can anyone explain this to me?
especially the parameters of the class def and the ending "by from". what does it mean?
the use case is like a list or something i suppose?Chills
01/26/2020, 2:00 PMFoso
01/26/2020, 2:01 PMChills
01/26/2020, 2:11 PMChills
01/26/2020, 2:12 PMRay Eldath
01/26/2020, 6:49 PM