| Author |
Can't find the method values() used for enums.
|
Nikolaos Plastiras
Greenhorn
Joined: Feb 08, 2012
Posts: 7
|
|
I am trying to find the static values() method that is used to iterate through enums in J2SE 6 documentation but I can't find it.
Is this the correct class?
public abstract class Enum<E extends Enum<E>> extends Object implements Comparable<E>, Serializable
|
 |
Emanuel Kadziela
Ranch Hand
Joined: Mar 24, 2005
Posts: 186
|
|
it's not the Enum class, its the enum keyword, like this:
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19214
|
|
|
The values() method gets generated automatically for all enum classes. You can find it in the specific enum Javadoc page. For example check out TimeUnit.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
|
|
|
It does get a mention in the Enum javadoc, but not as a separate method, just as an aside in the description of the valueOf method.
|
Joanne
|
 |
 |
|
|
subject: Can't find the method values() used for enums.
|
|
|