- All Implemented Interfaces:
Serializable,Comparable<AssetExtension>,Constable
Enumeration of support
Asset file extensions.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertExtension(AssetExtension extension, AssetExtension... assetExtensions) Asserts that a file has a given extension.static voidassertPathExtension(String path, AssetExtension... assetExtensions) Asserts that a file has a given extension.static AssetExtensionGets theAssetExtensionfrom a file path.static AssetExtensionReturns the enum constant of this class with the specified name.static AssetExtension[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
JPG
The "jpg"SolaImagefile extension. -
JSON
The "json"JsonElementAssetfile extension. -
MP3
The "mp3"AudioClipfile extension. -
PNG
The "png"SolaImagefile extension. -
WAV
The "wav"AudioClipfile extension.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
fromPath
Gets theAssetExtensionfrom a file path. ThrowsIllegalArgumentExceptionif the extension is not supported.- Parameters:
path- the file path- Returns:
- the
AssetExtensionfor the file path
-
assertPathExtension
Asserts that a file has a given extension.- Parameters:
path- the path for the fileassetExtensions- the valid assetExtensions for the file
-
assertExtension
Asserts that a file has a given extension.- Parameters:
extension- the extension to testassetExtensions- the valid assetExtensions for the file
-