.values()
youYou can docall the following:values() method on your enum.
for (Direction dir : Direction.values()) {
// do what you want
}
This values() method is implicitly declared by the compiler. So it is not listed on Enum doc.