title: Java Enum to initialize with condition
body: <p>Say in some condition I want to initialize my enum Foo with the following values.</p>
  
  <pre><code>private enum Foo {
    BAR1("1"),
    BAR2("2"),
    BAR3("3")
  }
  </code></pre>
  
  <p>In some other cases, I want a different set of values.</p>
  
  <pre><code>private enum Foo {
    BAR1("x"),
    BAR2("y"),
    BAR3("z")
  }
  </code></pre>
  
  <p>Then later in other code, it can use the same enum for processing. How can I do this? Or is there other better approach doing achieve my goal? </p>