Hullaballoonatic
04/11/2019, 8:01 PMclass Matrix(elements: Collection<Collection<Double>>): MutableList<Vector> by data {
val data = ObservableList<Vector>(elements.map { it.toVector() } , ::onAdd, ::onRemove)
}
karelpeeters
04/11/2019, 8:01 PMHullaballoonatic
04/11/2019, 8:03 PMMutableList
in exactly the same way... simply directing it to perform the exact same thing on the data field...karelpeeters
04/11/2019, 8:04 PMHullaballoonatic
04/11/2019, 8:04 PMkarelpeeters
04/11/2019, 8:05 PMHullaballoonatic
04/11/2019, 8:17 PMonAdd
and onRemove
function definitions need to call on fields that don't exist yet. I could pass those fields into the constructor ALSO, but this feels like a snowball effect that leads to madness and confusing code.karelpeeters
04/11/2019, 8:18 PMHullaballoonatic
04/11/2019, 8:19 PM