Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Added overloaded listProperty builder for varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvin Syse committed Mar 6, 2019
1 parent d82d310 commit 7cadc7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/tornadofx/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ fun doubleProperty(value: Double = 0.0) = SimpleDoubleProperty(value)
fun floatProperty(value: Float = 0F) = SimpleFloatProperty(value)
fun intProperty(value: Int = 0) = SimpleIntegerProperty(value)
fun <V> listProperty(value: ObservableList<V>? = null) = SimpleListProperty(value)
fun <V> listProperty(vararg values: V) = SimpleListProperty(values.toMutableList().asObservable())
fun longProperty(value: Long) = SimpleLongProperty(value)
fun <K, V> mapProperty(value: ObservableMap<K, V>? = null) = SimpleMapProperty(value)
fun <T> objectProperty(value: T? = null) = SimpleObjectProperty(value)
Expand Down

0 comments on commit 7cadc7d

Please sign in to comment.