title: EnumMap vs. Enum values
body: <p>What's the difference between this:</p>
  
  <pre><code>public enum Direction {
      NORTH(90),
      EAST(0),
      SOUTH(270),
      WEST(180);
  
      private final int degree_;
  
      private Direction(int degree) {
          degree_ = degree;
      }
  
      public int getDegree() {
          return degree_;
      }
  
      public static void main(String[] args) {
          System.out.println(NORTH.getDegree());
      }
  }
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>public enum Direction {
      NORTH,
      EAST,
      SOUTH,
      WEST;
  
      public static void main(String[] args) {
          EnumMap&lt;Direction, int&gt; directionToDegree = new EnumMap&lt;Direction, int&gt;(Direction.class);
          directionToDegree.put(NORTH, 90);
          directionToDegree.put(EAST, 0);
          directionToDegree.put(SOUTH, 270);
          directionToDegree.put(WEST, 180);
  
          System.out.println(directionToDegree.get(NORTH));
      }
  }
  </code></pre>
  
  <p>Is one easier to read? Is one more flexible? Is one used more conventionally? Does one run faster? Any other pros and cons?</p>