Enum DisplayStyle

  • All Implemented Interfaces:
    Serializable, Comparable<DisplayStyle>

    public enum DisplayStyle
    extends Enum<DisplayStyle>
    List of the different display style of the user mentions.
    Since:
    12.5RC1
    Version:
    $Id: d61fe9eb1e497f9f20f596298eeef53993eeeb67 $
    • Enum Constant Detail

      • FULL_NAME

        public static final DisplayStyle FULL_NAME
        Displays the first and last name of the mentioned user.
      • FIRST_NAME

        public static final DisplayStyle FIRST_NAME
        Displays only the first name of the mentioned user.
      • LOGIN

        public static final DisplayStyle LOGIN
        Displays the login of the mentioned user.
    • Method Detail

      • values

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

        public static DisplayStyle 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
      • getOrDefault

        @Unstable
        public static DisplayStyle getOrDefault​(String style)
        Parameters:
        style - the display style (e.g., login)
        Returns:
        the result of valueOf(String) or FULL_NAME if style is null
        Since:
        13.10.7, 14.4.2, 14.5