The ordinal() method returns the ordinal of an enum instance.
How can I set the ordinal for an enum?
From http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Enum.html
public final int ordinal()Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero). Most programmers will have no use for this method. It is designed for use by sophisticated enum-based data structures, such as EnumSet and EnumMap.
Returns: the ordinal of this enumeration constant
If you have
public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY }
then SUNDAY has an ordinal of 0, MONDAY is 1, and so on...