title: A for-loop to iterate over an enum in Java
body: <p>I have an <code>enum</code> in Java for the cardinal and intermediate directions:</p>
  <pre><code>public enum Direction {
     NORTH,
     NORTHEAST,
     EAST,
     SOUTHEAST,
     SOUTH,
     SOUTHWEST,
     WEST,
     NORTHWEST
  }
  </code></pre>
  <p>How can I write a <code>for</code> loop that iterates through each of these <code>enum</code> values?</p>