Enum Class IMAPCommand

java.lang.Object
java.lang.Enum<IMAPCommand>
org.apache.commons.net.imap.IMAPCommand
All Implemented Interfaces:
Serializable, Comparable<IMAPCommand>, Constable

public enum IMAPCommand extends Enum<IMAPCommand>
IMAPCommand stores IMAP command codes.
  • Enum Constant Details

  • Field Details

    • imapCommand

      private final String imapCommand
    • minParamCount

      private final int minParamCount
    • maxParamCount

      private final int maxParamCount
  • Constructor Details

    • IMAPCommand

      private IMAPCommand()
    • IMAPCommand

      private IMAPCommand(String name)
    • IMAPCommand

      private IMAPCommand(int paramCount)
    • IMAPCommand

      private IMAPCommand(int minCount, int maxCount)
    • IMAPCommand

      private IMAPCommand(String name, int paramCount)
    • IMAPCommand

      private IMAPCommand(String name, int minCount, int maxCount)
  • Method Details

    • values

      public static IMAPCommand[] 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 IMAPCommand 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
    • getCommand

      public static final String getCommand(IMAPCommand command)
      Get the IMAP protocol string command corresponding to a command code.
      Parameters:
      command - the IMAPCommand whose command string is required.
      Returns:
      The IMAP protocol string command corresponding to a command code.
    • getIMAPCommand

      public String getIMAPCommand()
      Get the IMAP protocol string command for this command
      Returns:
      The IMAP protocol string command corresponding to this command