title: Java: How to modify value of current enum inside of its type definition?
body: <p>I defined an enum type that implements an interface as follows:</p>
  
  <pre><code>public enum MyEnum implements MyInterface
  {
      val1, val2, val3;
      private MyEnum() {}
      private MyEnum(Parcel in)
      {
          readFromParcel(in);
      }
  
      public void readFromParcel(Parcel in)
      {
          MyEnum val = MyEnum.values()[in.readInt()];
          // ??? How to I assign val to my current enum?
      }
  
  }
  </code></pre>
  
  <p>How do I access the value of the current enum object so I can make the assignment inside of <code>readFromParcel()</code> ? (Please see comment in code)</p>