chickenfresh
08/25/2018, 5:29 PMdiesieben07
08/25/2018, 5:30 PMfind works on collections.chickenfresh
08/25/2018, 5:34 PMval itemsList = FXCollections.observableArrayList<itemModel>()
itemsList.find { it.id == 1 }
ItemModel contains val id: Int
so how should look working example if I’d put ItemModel into sealed class like this:
sealed class AnotherViewInstance {
data class Item(val item: ItemModel): AnotherViewInstance()
}diesieben07
08/25/2018, 5:37 PMitemsList.find { it is AnotherViewInstance.Item && it.id == 1 }chickenfresh
08/25/2018, 5:47 PMwhen also an option in case If i’d need to use it with another data class?diesieben07
08/25/2018, 5:48 PM