Enum IMAPCommand

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<IMAPCommand>

    public enum IMAPCommand
    extends java.lang.Enum<IMAPCommand>
    IMAPCommand stores IMAP command codes.
    • Field Detail

      • imapCommand

        private final java.lang.String imapCommand
      • minParamCount

        private final int minParamCount
      • maxParamCount

        private final int maxParamCount
    • Constructor Detail

      • IMAPCommand

        private IMAPCommand()
      • IMAPCommand

        private IMAPCommand​(int paramCount)
      • IMAPCommand

        private IMAPCommand​(int minCount,
                            int maxCount)
      • IMAPCommand

        private IMAPCommand​(java.lang.String name)
      • IMAPCommand

        private IMAPCommand​(java.lang.String name,
                            int paramCount)
      • IMAPCommand

        private IMAPCommand​(java.lang.String name,
                            int minCount,
                            int maxCount)
    • Method Detail

      • 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
      • valueOf

        public static IMAPCommand valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getCommand

        public static final java.lang.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 java.lang.String getIMAPCommand()
        Get the IMAP protocol string command for this command
        Returns:
        The IMAP protocol string command corresponding to this command