Last active
November 24, 2016 15:33
-
-
Save sliskiCode/4ab12eaa2f13fccf1566b001c9c6d28d to your computer and use it in GitHub Desktop.
7 things you probably don’t know about Kotlin #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var price: Double by Delegates.vetoable(0.0) { prop, old, new -> | |
| validate(new) | |
| } | |
| fun validate(price: Double) : Boolean { | |
| // Validation checks | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment