Enum Message.MentionType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Message.MentionType>
    Enclosing interface:
    Message

    public static enum Message.MentionType
    extends java.lang.Enum<Message.MentionType>
    Mention formatting constants, useful for use with Patterns
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CHANNEL
      Represents a mention for a TextChannel
      EMOTE
      Represents a mention for a Emote
      EVERYONE
      Represents a mention for all users in a server, literal @everyone.
      HERE
      Represents a mention for all active users, literal @here
      ROLE
      Represents a mention for a Role
      USER
      Represents a mention for a User/Member
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.regex.Pattern getPattern()  
      static Message.MentionType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Message.MentionType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static Message.MentionType[] 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 (Message.MentionType c : Message.MentionType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Message.MentionType 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
      • getPattern

        public java.util.regex.Pattern getPattern()