com.openexchange.mail
Enum MailSortField

java.lang.Object
  extended by java.lang.Enum<MailSortField>
      extended by com.openexchange.mail.MailSortField
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MailSortField>

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

MailSortField - An enumeration of sortable mail list fields.

Author:
Thorben Betten

Enum Constant Summary
ACCOUNT_NAME
          Account name
CC
          Cc
COLOR_LABEL
          Color Label
FLAG_SEEN
          Flag \SEEN
FROM
          From
RECEIVED_DATE
          Received date
SENT_DATE
          Sent date
SIZE
          Size
SUBJECT
          Subject
TO
          To
 
Method Summary
 int getField()
           
static MailSortField getField(int field)
          Determines the corresponding MailSortField constant to given int value
static MailSortField[] getFields(int[] fields)
          Creates an array of MailSortField corresponding to given int values
 java.lang.String getKey()
           
 MailListField getListField()
           
static MailSortField valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MailSortField[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FROM

public static final MailSortField FROM
From


TO

public static final MailSortField TO
To


CC

public static final MailSortField CC
Cc


SUBJECT

public static final MailSortField SUBJECT
Subject


SIZE

public static final MailSortField SIZE
Size


SENT_DATE

public static final MailSortField SENT_DATE
Sent date


RECEIVED_DATE

public static final MailSortField RECEIVED_DATE
Received date


COLOR_LABEL

public static final MailSortField COLOR_LABEL
Color Label


FLAG_SEEN

public static final MailSortField FLAG_SEEN
Flag \SEEN


ACCOUNT_NAME

public static final MailSortField ACCOUNT_NAME
Account name

Method Detail

values

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

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

valueOf

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

getField

public int getField()
Returns:
The int field value

getKey

public java.lang.String getKey()
Returns:
The JSON key

getListField

public MailListField getListField()
Returns:
The corresponding list field

getFields

public static final MailSortField[] getFields(int[] fields)
Creates an array of MailSortField corresponding to given int values

Parameters:
fields - The int values
Returns:
The array of MailSortField corresponding to given int values

getField

public static final MailSortField getField(int field)
Determines the corresponding MailSortField constant to given int value

Parameters:
field - The int value
Returns:
The corresponding MailSortField constant