Enum Class URLType

java.lang.Object
java.lang.Enum<URLType>
com.github.westsi.browser.util.url.URLType
All Implemented Interfaces:
Serializable, Comparable<URLType>, Constable

public enum URLType extends Enum<URLType>
The type of a URL that can be handled by the browser. Has utility methods for working this out from a URL.
  • Enum Constant Details

    • FILE

      public static final URLType FILE
    • HTTP

      public static final URLType HTTP
    • HTTPS

      public static final URLType HTTPS
    • DATA

      public static final URLType DATA
    • VIEW_SOURCE

      public static final URLType VIEW_SOURCE
  • Field Details

    • protocol

      public final String protocol
  • Method Details

    • values

      public static URLType[] 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 URLType 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
    • getFromURLPrefix

      public static URLType getFromURLPrefix(String url)
      Parameters:
      url - The url whose type needs to be found
      Returns:
      The enum instance for the URLType