title: Override getter for Kotlin data class
body: <p>Given the following Kotlin class:</p>
  
  <pre><code>data class Test(val value: Int)
  </code></pre>
  
  <p>How would I override the <code>Int</code> getter so that it returns 0 if the value negative?</p>
  
  <p>If this isn't possible, what are some techniques to achieve a suitable result?</p>