Enum DocumentType

  • All Implemented Interfaces:
    Serializable, Comparable<DocumentType>

    public enum DocumentType
    extends Enum<DocumentType>
    This class defines enumerated types for a Document. Applications will not create or modify DocumentTypes, but will use one of the predefined DocumentType instances ARTICLE, BOOK, REPORT, RFC, STANDARD, WEB, or OTHER.
    See Also:
    Document
    • Enum Constant Detail

      • ARTICLE

        public static final DocumentType ARTICLE
        Document type for a printed article.
      • BOOK

        public static final DocumentType BOOK
        Document type for an book.
      • REPORT

        public static final DocumentType REPORT
        Document type for a report.
      • RFC

        public static final DocumentType RFC
        Document type for an IETF Request for Comment.
      • STANDARD

        public static final DocumentType STANDARD
        Document type for a standards body publication.
      • WEB

        public static final DocumentType WEB
        Document type for a Web page.
      • OTHER

        public static final DocumentType OTHER
        Document type that doesn't fit the other categories.
    • Field Detail

      • name

        public final String name
        A String name for the type, used for reporting.
    • Method Detail

      • values

        public static DocumentType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DocumentType c : DocumentType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DocumentType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null