com.openexchange.mail.api
Enum MailConfig.ServerSource

java.lang.Object
  extended by java.lang.Enum<MailConfig.ServerSource>
      extended by com.openexchange.mail.api.MailConfig.ServerSource
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MailConfig.ServerSource>
Enclosing class:
MailConfig

public static enum MailConfig.ServerSource
extends java.lang.Enum<MailConfig.ServerSource>


Enum Constant Summary
GLOBAL
          Server is taken from appropriate property
USER
          Server is taken from user
 
Method Summary
static MailConfig.ServerSource parse(java.lang.String serverSourceStr)
          Parses specified string into a server source.
 java.lang.String toString()
           
static MailConfig.ServerSource valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MailConfig.ServerSource[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GLOBAL

public static final MailConfig.ServerSource GLOBAL
Server is taken from appropriate property


USER

public static final MailConfig.ServerSource USER
Server is taken from user

Method Detail

values

public static final MailConfig.ServerSource[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(MailConfig.ServerSource c : MailConfig.ServerSource.values())
        System.out.println(c);

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

valueOf

public static MailConfig.ServerSource 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

parse

public static final MailConfig.ServerSource parse(java.lang.String serverSourceStr)
Parses specified string into a server source.

Parameters:
serverSourceStr - The string to parse to a server source
Returns:
An appropriate server source or null if string could not be parsed to a server source

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<MailConfig.ServerSource>