title: Adding a property to an existing enum in Kotlin
body: <p>Given the following enum defined in an external api.</p>
  
  <pre><code>public enum Status {
    COMPLETE,
    RUNNING,
    WAITING
  }
  </code></pre>
  
  <p>I would like a way to add a int flag to each enum value.  I know that I can extend the enum:</p>
  
  <pre><code>fun Status.flag(): Int {
      when(this) {
          RUNNING -&gt; return 1;
          WAITING -&gt; return 2;
          else -&gt; return 0;
      }
  }
  </code></pre>
  
  <p>However I would like to define those int flag values as constants.  Maybe a companion object, but I don't think I can extend an existing enum and add a companion object.</p>
  
  <p>Any ideas?</p>