Enum OnlineResource

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

    public enum OnlineResource
    extends java.lang.Enum<OnlineResource>
    Online resources directly used by JOSM. This does not include websites where user can sometimes be redirected through its web browser, but only those to we establish a connection.
    Since:
    7434
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALL
      Value used to represent all online resources
      CACHE_UPDATES
      Updates of CachedFile
      CERTIFICATES
      Various government certificates downloaded on Windows to make https imagery work in some countries
      JOSM_WEBSITE
      The JOSM website, used for startup page, imagery/presets/styles/rules entries, help, etc.
      OSM_API
      The OSM API, used for download, upload, history, etc.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String locName  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OnlineResource​(java.lang.String locName)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLocName()
      Replies the localized name.
      java.lang.String getOfflineIcon()
      Replies the offline icon.
      boolean matches​(java.lang.String url)
      Replies whether the given URL matches this online resource
      static OnlineResource valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static OnlineResource[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • locName

        private final java.lang.String locName
    • Constructor Detail

      • OnlineResource

        private OnlineResource​(java.lang.String locName)
    • Method Detail

      • values

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

        public static OnlineResource 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
      • getLocName

        public java.lang.String getLocName()
        Replies the localized name.
        Returns:
        the localized name
      • getOfflineIcon

        public java.lang.String getOfflineIcon()
        Replies the offline icon.
        Returns:
        the offline icon
        Since:
        17041
      • matches

        public boolean matches​(java.lang.String url)
        Replies whether the given URL matches this online resource
        Parameters:
        url - the URL to check
        Returns:
        whether the given URL matches this online resource