Skip to content

Instantly share code, notes, and snippets.

@trukhinyuri
Created March 14, 2012 14:06
Show Gist options
  • Select an option

  • Save trukhinyuri/2036693 to your computer and use it in GitHub Desktop.

Select an option

Save trukhinyuri/2036693 to your computer and use it in GitHub Desktop.
Access to backing field
//Configuration file
class ConfigFile {
//The seek to move the cursor to the next line in a binary file of database index
val seek : Long = 99999
var pointer : Long
get() = $pointer
set(value) {
if (value >= 0) {
$pointer = value
}
else {
$pointer = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment