Created
April 30, 2019 01:09
-
-
Save agustarc/e7c05209b7d65735d04ccb86998bbcf9 to your computer and use it in GitHub Desktop.
This file contains 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
object AccountPreference : PreferenceHolder(name = "account", cacheStrategy = CacheStrategy.LAZY) { | |
var name: String by ReadWriteString(predicate = { it.length > 2 }) | |
var age: Int by ReadWriteInt(default = 1, caching = false) | |
var hireable: Boolean by ReadWriteBoolean() | |
var score: Float by ReadWriteFloat(default = 0.1f) | |
var repos: Long by ReadWriteLong() | |
var followers: ArrayList<User>? by ReadWriteSerializable(type = inferType<ArrayList<User>>()) | |
var friend: User? by ReadWriteSerializable(type = inferType<User>()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment