title: Using an enum in the definition of another enum iteratively
body: <p>I'm trying to make my code more extensible for other devs by using Enums rather than an array of strings. I have:</p>
  
  <pre><code>public enum FOO {
     A, B, C, D, E
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public enum BAR {
     Z, Y, X, W
  }
  </code></pre>
  
  <p>In <code>FOO</code> I want to be able to define iteratively:</p>
  
  <pre><code>D, E, F(Z), F(Y), F(X), F(W)
  </code></pre>
  
  <p>So when I add items to BAR, it automatically adds it to FOO. I figure it has to be a method in FOO, and BAR should almost certainly be an inner class (thus private), but I've no idea how to do it. Using</p>
  
  <pre><code>for (BAR b : BAR.values()) {}
  </code></pre>
  
  <p>seems at least part of the solution.
  If it helps, for context, I'm using the Pathfinder RPG skills, with a list of each skill:</p>
  
  <pre><code>public enum SkillsEnum {
      ACROBATICS,
      APPRAISE,
      BLUFF,
      CLIMB,
      CRAFT,
      DIPLOMACY,
      DISABLE_DEVICE,
      DISGUISE,
      ESCAPE_ARTIST,
      FLY,
      HANDLE_ANIMAL,
      HEAL,
      INTIMIDATE,
      KNOWLEDGE(KnowledgeList.values().[0])
      KNOWLEDGE(KnowledgeList.values().[1]) etc
  }
  enum KnowledgeList {
       ARCANA,
       DUNGEONEERING,
       ENGINEERING,
       GEOGRAPHY,
       HISTORY,
       LOCAL,
       NATURE,
       NOBILITY,
       PLANES,
       RELIGION
  }
  </code></pre>