Package adams.core.net.imap
Enum Flag
- java.lang.Object
-
- java.lang.Enum<Flag>
-
- adams.core.net.imap.Flag
-
- All Implemented Interfaces:
Serializable
,Comparable<Flag>
public enum Flag extends Enum<Flag>
IMAP message flags.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANSWERED
DELETED
DRAFT
FLAGGED
NOT_ANSWERED
NOT_DELETED
NOT_DRAFT
NOT_FLAGGED
NOT_RECENT
NOT_SEEN
RECENT
SEEN
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isValid(Flag[] flags)
Checks whether the flags are valid.static void
updateFilter(Flag[] flags, jodd.mail.EmailFilter filter)
Sets the flags on the filter.static Flag
valueOf(String name)
Returns the enum constant of this type with the specified name.static Flag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANSWERED
public static final Flag ANSWERED
-
NOT_ANSWERED
public static final Flag NOT_ANSWERED
-
DELETED
public static final Flag DELETED
-
NOT_DELETED
public static final Flag NOT_DELETED
-
DRAFT
public static final Flag DRAFT
-
NOT_DRAFT
public static final Flag NOT_DRAFT
-
FLAGGED
public static final Flag FLAGGED
-
NOT_FLAGGED
public static final Flag NOT_FLAGGED
-
RECENT
public static final Flag RECENT
-
NOT_RECENT
public static final Flag NOT_RECENT
-
SEEN
public static final Flag SEEN
-
NOT_SEEN
public static final Flag NOT_SEEN
-
-
Method Detail
-
values
public static Flag[] 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 (Flag c : Flag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Flag 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 nameNullPointerException
- if the argument is null
-
isValid
public static boolean isValid(Flag[] flags)
Checks whether the flags are valid.- Parameters:
flags
- the flags to check- Returns:
- true if valid
-
updateFilter
public static void updateFilter(Flag[] flags, jodd.mail.EmailFilter filter)
Sets the flags on the filter.- Parameters:
flags
- the flags to setfilter
- the filter to update
-
-