Enum Class EmailReadDirection

java.lang.Object
java.lang.Enum<EmailReadDirection>
com.northconcepts.datapipeline.email.EmailReadDirection
All Implemented Interfaces:
Serializable, Comparable<EmailReadDirection>, Constable

public enum EmailReadDirection extends Enum<EmailReadDirection>
The order in which an EmailReader reads the messages it found: first to last or last to first.
  • Enum Constant Details

  • Method Details

    • values

      public static EmailReadDirection[] 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

      public static EmailReadDirection valueOf(String name)
      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 name
      NullPointerException - 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.