Use of enums in Java API

enums, java

Solution

There are 328 enum classes defined in the JRE 7. I suggest you read the Enum Types tutorial

A simple one I have used is java.nio.AccessMode.

An enum worth understanding is Thread.State

A more interesting one is java.util.concurrent.TimeUnit

An example of a class which IMHO would be an `enum` but predates them is ByteOrder See Joachim's comment above.

Problem

Could you point me out to a class, from official Java API that has a good use of enums ? I could not find any specific class. Does the Java API incorporates enums in their classes at all?

Original source