https://kotlinlang.org logo
#announcements
Title
# announcements
d

diesieben07

07/16/2017, 6:59 PM
Delegates.vetoable
?
s

supaham

07/16/2017, 7:02 PM
Yeah thanks, that's close to what i'm thinking. However I was wondering if there is a built in one that basically does a Math.min, Math.max call instead of making my own
d

diesieben07

07/16/2017, 7:03 PM
I don't think so.
But
var foo by Delegates.vetoable(3) { _, _, newValue -> newValue in 0..3 }
is pretty concise.
👍 1
❤️ 1
k

kevinmost

07/16/2017, 7:39 PM
yeah, that doesn't exist but would be pretty easy to implement yourself