Enum SEOPriority

  • All Implemented Interfaces:
    Serializable, Comparable<SEOPriority>

    public enum SEOPriority
    extends Enum<SEOPriority>
    This enumeration holds all possible values for the Google Sitemaps SEO Priority. It determines the priority of this URL relative to other URLs on the site. Values are in the range between 0.0 and 1.0. The SEO priority is written to the generated sitemaps XML as priority attribute. For more information, see https://www.sitemaps.org/protocol.html#prioritydef
    • Method Detail

      • values

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

        public static SEOPriority 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
      • byName

        public static SEOPriority byName​(String name)
        Returns the SEO priority matching the name (i.e. 'ABOVE_NORMAL').
        Parameters:
        name - Name of the SEO priority to match
        Returns:
        the matching SEO priority or null if no match was found
      • byId

        public static SEOPriority byId​(String id)
        Returns the SEO priority matching the identifier (i.e. '0.1').
        Parameters:
        id - Identifier of the SEO priority to match
        Returns:
        the matching SEO priority or null if no match was found
      • getName

        public String getName()
        The name of the priority expressed as String. For example 'ABOVE_NORMAL'.
        Returns:
        name of the priority
      • getId

        public String getId()
        The identifier of the priority, used to persist this value. For example '0.1'.
        Returns:
        identifier of the priority