Google Data APIs Client Library (1.41.1)



com.google.gdata.data.webmastertools
Enum DomainPreference

java.lang.Object
  extended by java.lang.Enum<DomainPreference>
      extended by com.google.gdata.data.webmastertools.DomainPreference
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DomainPreference>

public enum DomainPreference
extends java.lang.Enum<DomainPreference>

DomainPreference is an enumerated type that indicates the preferred domain to use for a concrete site for Search Console. The possibilities are:

  - PREFERWWW: domain.com and www.domain.com should be  associated 
        and www.domain.com is preferred
  - PREFERNOWWW: domain.com and www.domain.com should be associated 
         domain.com is preferred
  - NONE: there should be no association 
 


Enum Constant Summary
NONE
           
PREFER_NO_WWW
           
PREFER_WWW
           
 
Method Summary
static DomainPreference fromString(java.lang.String value)
          Parse a string and return a domain preference.
static DomainPreference getDefault()
          Get the default value for the domain preference.
 java.lang.String toString()
          Returns the string representation of the Domain Preference.
static DomainPreference valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DomainPreference[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final DomainPreference NONE

PREFER_WWW

public static final DomainPreference PREFER_WWW

PREFER_NO_WWW

public static final DomainPreference PREFER_NO_WWW
Method Detail

values

public static DomainPreference[] 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 (DomainPreference c : DomainPreference.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DomainPreference 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

toString

public java.lang.String toString()
Returns the string representation of the Domain Preference.

Overrides:
toString in class java.lang.Enum<DomainPreference>

getDefault

public static DomainPreference getDefault()
Get the default value for the domain preference.

Returns:
default value for the domain preference.

fromString

public static DomainPreference fromString(java.lang.String value)
                                   throws java.lang.IllegalArgumentException
Parse a string and return a domain preference.

Parameters:
value - a string representing a domain preference
Returns:
a DomainPrefrence if the parameter can be successfully parsed
Throws:
java.lang.IllegalArgumentException - if the parameter is not a valid DomainPreference string