Enum Class AssetExtension

java.lang.Object
java.lang.Enum<AssetExtension>
technology.sola.engine.assets.AssetExtension
All Implemented Interfaces:
Serializable, Comparable<AssetExtension>, Constable

public enum AssetExtension extends Enum<AssetExtension>
Enumeration of support Asset file extensions.
  • Enum Constant Details

  • Method Details

    • values

      public static AssetExtension[] 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

      public static AssetExtension valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromPath

      public static AssetExtension fromPath(String path)
      Gets the AssetExtension from a file path. Throws IllegalArgumentException if the extension is not supported.
      Parameters:
      path - the file path
      Returns:
      the AssetExtension for the file path
    • assertPathExtension

      public static void assertPathExtension(String path, AssetExtension... assetExtensions)
      Asserts that a file has a given extension.
      Parameters:
      path - the path for the file
      assetExtensions - the valid assetExtensions for the file
    • assertExtension

      public static void assertExtension(AssetExtension extension, AssetExtension... assetExtensions)
      Asserts that a file has a given extension.
      Parameters:
      extension - the extension to test
      assetExtensions - the valid assetExtensions for the file