title: Kotlin: does it make sense a property with private get and public set?
body: <p>I am new to Kotlin, and I have been experimenting with the language. In <em>Kotlin in Action</em>, it says the following:</p>
  <blockquote>
  <p>The accessor’s visibility by default is the same as the property’s. But you can change
  this if you need to, by putting a visibility modifier before the get or set keyword.</p>
  </blockquote>
  <p>I have tried to create a property that has a private getter and a public setter, as follows:</p>
  <pre class="lang-kotlin prettyprint-override"><code>class BackingField {
      var aProperty = 1
          private get
          set(value) {
              field = value + 1
          }
  }
  </code></pre>
  <p>However, IntelliJ is suggesting me to remove the <code>private</code> modifier before <code>get</code>. Is is possible to have a public property with a private getter and a public setter? If so, what are some common applications of such entity? If not, could we conclude that what is stated in the book is partially wrong?</p>