Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6548433

(enum spec) java.lang.Enum docs should explain about values() and valueOf(String)

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b48
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      A DESCRIPTION OF THE PROBLEM :
      Every enum class has the static methods values() and valueOf(String). However the java.lang.Enum docs doesn't says a single word about these. So many developers, specially begginers, misses these.

      The docs should state in the description of the class that the compiler generate these two methods for every subclass, and also show how to use they.

      The static method valueOf(Class,String) of the Enum class, should state that subclasses could use their static method valueOf(String) instead of valueOf(Class,String).

      ACTUAL -
      The java.lang.Enum docs doesn't says anything about values() and valueOf(String).

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/javase/6/docs/api/java/lang/Enum.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                ndcosta Nelson Dcosta
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: