Enum DownloadResult

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DownloadResult>

    public enum DownloadResult
    extends java.lang.Enum<DownloadResult>
    DownloadResult - Documentation.

    This enumerated type is used by the class ScrapeArticles as a return-value. The different constants below are explained in the comments section of each constant. Only the constant named 'SUCCESS' indicates that a news class 'Article' was both successfully downloaded and also handled / saved by the 'ScrapedArticleReceiver' instance. All other constants are used to indicate something went wrong during either the download process or when attempting to save the Article.



    • Method Detail

      • values

        public static DownloadResult[] 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 (DownloadResult c : DownloadResult.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DownloadResult valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null