Each Enum type has a static values method that returns an array containing all of the values of the enum type in the order they are declared.
This method is commonly used in combination with the for-each loop to iterate over the values of an enumerated type.
Java 7 Spec documentation link :
http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.9.2