Package discord4j.rest.util
Enum Image.Format
- java.lang.Object
-
- java.lang.Enum<Image.Format>
-
- discord4j.rest.util.Image.Format
-
- All Implemented Interfaces:
Serializable
,Comparable<Image.Format>
- Enclosing class:
- Image
public static enum Image.Format extends Enum<Image.Format>
The format of an image. This enum represents all the types supported by Discord.- See Also:
- Image Formats
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExtension()
Gets the file extension associated with this format.static Image.Format
valueOf(String name)
Returns the enum constant of this type with the specified name.static Image.Format[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final Image.Format UNKNOWN
Unknown image format.
-
JPEG
public static final Image.Format JPEG
Represents the Joint Photographic Experts Group format.
-
PNG
public static final Image.Format PNG
Represents the Portable Network Graphics format.
-
WEB_P
public static final Image.Format WEB_P
Represents the WebP format.
-
GIF
public static final Image.Format GIF
Represents the Graphics Interchange Format format.
-
-
Method Detail
-
values
public static Image.Format[] 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 (Image.Format c : Image.Format.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Image.Format 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
-
getExtension
public String getExtension()
Gets the file extension associated with this format.- Returns:
- The file extension associated with this format.
-
-