title: Declare enum variable in Java bean
body: <p>I need to declare an enum variable as a class member and need to define a setter and getter for that like a java bean. something like this -</p>
  
  <pre><code>public class Vehicle {
   private String id;
   private String name;
   enum color {
     RED, GREEN, ANY;
   }
   // setter and getters
  } 
  </code></pre>
  
  <p>Now, I want to set color property as red, green or any from some other class and want to make decisions accordingly.</p>