Enum Class URL

java.lang.Object
java.lang.Enum<URL>
org.troy.capstone.constants.URL
All Implemented Interfaces:
Serializable, Comparable<URL>, Constable

public enum URL extends Enum<URL>
Enum for commonly used URLs in the application, such as attribution links and default image URLs. This helps avoid hardcoding strings throughout the codebase and reduces risk of typos.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Deprecated.
    This name was only used for making a sample container in order to get approval for an Unsplash API license.
    Deprecated.
    This URL was only used for making a sample container in order to get approval for an Unsplash API license.
    Deprecated.
    This URL was only used for making a sample container in order to get approval for an Unsplash API license.
    URL for Unsplash attribution, used to give credit to the image source.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The string value associated with this enum constant, used for URLs and attribution information.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    URL(String url)
    Constructs a URL enum constant with the specified string value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Getter for the string value associated with this enum constant.
    static URL
    Returns the enum constant of this class with the specified name.
    static URL[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • UNSPLASH_ATTRIBUTION

      public static final URL UNSPLASH_ATTRIBUTION
      URL for Unsplash attribution, used to give credit to the image source.
    • DEFAULT_AUTHOR_URL

      @Deprecated public static final URL DEFAULT_AUTHOR_URL
      Deprecated.
      This URL was only used for making a sample container in order to get approval for an Unsplash API license.
      URL for the page of the author of the default image, used for attribution purposes.
    • DEFAULT_AUTHOR_NAME

      @Deprecated public static final URL DEFAULT_AUTHOR_NAME
      Deprecated.
      This name was only used for making a sample container in order to get approval for an Unsplash API license.
      Name of the author of the default image, used for attribution purposes.
    • DEFAULT_IMAGE_URL

      @Deprecated public static final URL DEFAULT_IMAGE_URL
      Deprecated.
      This URL was only used for making a sample container in order to get approval for an Unsplash API license. The default image is now sourced from a different URL that does not require attribution, so this URL is no longer used in the application.
      URL for the default image used when an item does not have its own image, sourced from Unsplash and chosen to be a generic mountain landscape that fits well with the theme of the application.
  • Field Details

    • url

      private final String url
      The string value associated with this enum constant, used for URLs and attribution information.
  • Constructor Details

    • URL

      private URL(String url)
      Constructs a URL enum constant with the specified string value.
      Parameters:
      url - The string value to associate with this enum constant, typically used for URLs and attribution information.
  • Method Details

    • values

      public static URL[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static URL valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getUrl

      public String getUrl()
      Getter for the string value associated with this enum constant.
      Returns:
      The string value that can be used for URLs and attribution information.