org.apache.commons.net.imap

## Enum IMAPCommand

- java.lang.Object
- - java.lang.Enum<IMAPCommand>
  - - org.apache.commons.net.imap.IMAPCommand

- All Implemented Interfaces:
    Serializable, Comparable<IMAPCommand>

      public enum IMAPCommand
      extends Enum<IMAPCommand>

  IMAPCommand stores IMAP command codes.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `APPEND` Valid in authenticated state.
    `AUTHENTICATE` Valid in Not Authenticated state
    `CAPABILITY` Valid in any state.
    `CHECK` Valid in selected state (substate of authenticated).
    `CLOSE` Valid in selected state (substate of authenticated).
    `COPY` Valid in selected state (substate of authenticated).
    `CREATE` Valid in authenticated state.
    `DELETE` Valid in authenticated state.
    `EXAMINE` Valid in authenticated state.
    `EXPUNGE` Valid in selected state (substate of authenticated).
    `FETCH` Valid in selected state (substate of authenticated).
    `LIST` Valid in authenticated state.
    `LOGIN` Valid in Not Authenticated state
    `LOGOUT` Valid in any state.
    `LSUB` Valid in authenticated state.
    `NOOP` Valid in any state.
    `RENAME` Valid in authenticated state.
    `SEARCH` Valid in selected state (substate of authenticated).
    `SELECT` Valid in authenticated state.
    `STARTTLS` Valid in Not Authenticated state
    `STATUS` Valid in authenticated state.
    `STORE` Valid in selected state (substate of authenticated).
    `SUBSCRIBE` Valid in authenticated state.
    `UID` Valid in selected state (substate of authenticated).
    `UNSUBSCRIBE` Valid in authenticated state.
    `XOAUTH` Authenticate an IMAP connection using OAuth.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getCommand(IMAPCommand command)` Gets the IMAP protocol string command corresponding to a command code.
    `String` | `getIMAPCommand()` Gets the IMAP protocol string command for this command
    `static IMAPCommand` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static IMAPCommand[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### APPEND

          public static final IMAPCommand APPEND

      Valid in authenticated state.

    - #### AUTHENTICATE

          public static final IMAPCommand AUTHENTICATE

      Valid in Not Authenticated state

    - #### CAPABILITY

          public static final IMAPCommand CAPABILITY

      Valid in any state.

    - #### CHECK

          public static final IMAPCommand CHECK

      Valid in selected state (substate of authenticated).

    - #### CLOSE

          public static final IMAPCommand CLOSE

      Valid in selected state (substate of authenticated).

    - #### COPY

          public static final IMAPCommand COPY

      Valid in selected state (substate of authenticated).

    - #### CREATE

          public static final IMAPCommand CREATE

      Valid in authenticated state.

    - #### DELETE

          public static final IMAPCommand DELETE

      Valid in authenticated state.

    - #### EXAMINE

          public static final IMAPCommand EXAMINE

      Valid in authenticated state.

    - #### EXPUNGE

          public static final IMAPCommand EXPUNGE

      Valid in selected state (substate of authenticated).

    - #### FETCH

          public static final IMAPCommand FETCH

      Valid in selected state (substate of authenticated).

    - #### LIST

          public static final IMAPCommand LIST

      Valid in authenticated state.

    - #### LOGIN

          public static final IMAPCommand LOGIN

      Valid in Not Authenticated state

    - #### LOGOUT

          public static final IMAPCommand LOGOUT

      Valid in any state.

    - #### LSUB

          public static final IMAPCommand LSUB

      Valid in authenticated state.

    - #### NOOP

          public static final IMAPCommand NOOP

      Valid in any state.

    - #### RENAME

          public static final IMAPCommand RENAME

      Valid in authenticated state.

    - #### SEARCH

          public static final IMAPCommand SEARCH

      Valid in selected state (substate of authenticated).

    - #### SELECT

          public static final IMAPCommand SELECT

      Valid in authenticated state.

    - #### STARTTLS

          public static final IMAPCommand STARTTLS

      Valid in Not Authenticated state

    - #### STATUS

          public static final IMAPCommand STATUS

      Valid in authenticated state.

    - #### STORE

          public static final IMAPCommand STORE

      Valid in selected state (substate of authenticated).

    - #### SUBSCRIBE

          public static final IMAPCommand SUBSCRIBE

      Valid in authenticated state.

    - #### UID

          public static final IMAPCommand UID

      Valid in selected state (substate of authenticated).

    - #### UNSUBSCRIBE

          public static final IMAPCommand UNSUBSCRIBE

      Valid in authenticated state.

    - #### XOAUTH

          public static final IMAPCommand XOAUTH

      Authenticate an IMAP connection using OAuth.

  - ### Method Detail

    - #### getCommand

          public static String getCommand(IMAPCommand command)

      Gets the IMAP protocol string command corresponding to a command code.
      Parameters:
        `command` - the `IMAPCommand` whose command string is required. Must not be null.
      Returns:
        The IMAP protocol string command corresponding to a command code.

    - #### getIMAPCommand

          public String getIMAPCommand()

      Gets the IMAP protocol string command for this command
      Returns:
        The IMAP protocol string command corresponding to this command

    - #### valueOf

          public static IMAPCommand 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 name
        `NullPointerException` - if the argument is null

    - #### values

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

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