com.r3corda.client.fxutils / javafx.collections.ObservableList

Extensions for javafx.collections.ObservableList

filter fun <A> ObservableList<out A>.filter(predicate: ObservableValue<(A) -> Boolean>): ObservableList<out A>

enum class FilterCriterion { HEIGHT, NAME } val filterCriterion: ObservableValue = (..) val people: ObservableList = (..) fun filterFunction(filterCriterion: FilterCriterion): (Person) -> Boolean { .. }

flatten fun <A> ObservableList<out ObservableValue<out A>>.flatten(): ObservableList<out A>

data class Person(val height: ObservableValue) val people: ObservableList = (..) val heights: ObservableList = people.map(Person::height).flatten()

fold fun <A, B> ObservableList<out A>.fold(initial: B, folderFunction: (B, A) -> B): ObservableValue<B>

val people: ObservableList = (..) val concatenatedNames = people.fold("", { names, person -> names + person.name }) val concatenatedNames2 = people.map(Person::name).fold("", String::plus)

map fun <A, B> ObservableList<out A>.map(function: (A) -> B): ObservableList<B>

val dogs: ObservableList = (..) val dogOwners: ObservableList = dogs.map { it.owner }