Enum Class EmailReadDirection
- All Implemented Interfaces:
Serializable,Comparable<EmailReadDirection>,Constable
The order in which an
EmailReader reads the messages it found: first to last or last to first.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract intgetFirstMessage(Message[] messages) Returns the 0-based index of the first message to read from the array.abstract booleanhasMoreMessages(int nextMessage, Message[] messages) Returns true if the given index has not yet moved past the last message to read in this direction.abstract intnextMessage(int nextMessage) Returns the index of the message to read after the one at the given index.static EmailReadDirectionReturns the enum constant of this class with the specified name.static EmailReadDirection[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FORWARD
-
BACKWARD
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getFirstMessage
public abstract int getFirstMessage(Message[] messages) Returns the 0-based index of the first message to read from the array. -
nextMessage
public abstract int nextMessage(int nextMessage) Returns the index of the message to read after the one at the given index. -
hasMoreMessages
public abstract boolean hasMoreMessages(int nextMessage, Message[] messages) Returns true if the given index has not yet moved past the last message to read in this direction.
-