Package discord4j.core.object.component
Enum Button.Style
- java.lang.Object
-
- java.lang.Enum<Button.Style>
-
- discord4j.core.object.component.Button.Style
-
- All Implemented Interfaces:
Serializable
,Comparable<Button.Style>
- Enclosing class:
- Button
public static enum Button.Style extends Enum<Button.Style>
A button's style is what determines its color and whether it has a custom id or a url.- See Also:
- Button Styles
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
static Button.Style
of(int value)
static Button.Style
valueOf(String name)
Returns the enum constant of this type with the specified name.static Button.Style[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final Button.Style UNKNOWN
-
PRIMARY
public static final Button.Style PRIMARY
-
SECONDARY
public static final Button.Style SECONDARY
-
SUCCESS
public static final Button.Style SUCCESS
-
DANGER
public static final Button.Style DANGER
-
LINK
public static final Button.Style LINK
-
-
Method Detail
-
values
public static Button.Style[] 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 (Button.Style c : Button.Style.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Button.Style 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 nameNullPointerException
- if the argument is null
-
getValue
public int getValue()
-
of
public static Button.Style of(int value)
-
-