...
Wiki Markup |
---|
According to the Java API \[[API 2006|AA. Bibliography#API 06]\], {{ordinal()}} is defined as
{{ |
|
...
|
...
|
...
|
...
|
...
...
Returns the ordinal of the 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 |
It defines use of The ordinal()
as function is also a helper function to sophisticated enum-based data-structures EnumSet
and EnumMap
.
Poor understanding of program design involving ordinal()
can cause programs to behave erroneously.
...