Enum Class SoundFormat

java.lang.Object
java.lang.Enum<SoundFormat>
pi.resources.sound.SoundFormat
All Implemented Interfaces:
Serializable, Comparable<SoundFormat>, Constable

public enum SoundFormat extends Enum<SoundFormat>
Enthält alle Audiodateiformate, die von der Engine unterstützt werden.
Author:
Steffen Wilke, Matthias Wilke
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static SoundFormat[] 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 SoundFormat 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
    • get

      public static SoundFormat get(String extension)
      Gibt das SoundFormat der angegebenen Dateierweiterung zurück.
      Parameters:
      extension - Die Dateierweiterung, aus dem das Format ermittelt wird. Die Dateierweiterung kann einen führenden Punkt enthalten. Die Groß- und Kleinschreibung wird ignoriert.
      Returns:
      Das Format des angegebenen Strings oder UNSUPPORTED, wenn es nicht unterstützt wird.
    • isSupported

      public static boolean isSupported(File file)
      Prüft, ob die Dateiendung der angegebenen Datei von der Engine unterstützt wird.
      Parameters:
      file - Die zu prüfende Datei.
      Returns:
      true, wenn die Dateiendung in diesem Enum enthalten ist; andernfalls false.
    • isSupported

      public static boolean isSupported(String fileName)
      Prüft, ob die Dateiendung des angegebenen Dateinamens von der Engine unterstützt wird.
      Parameters:
      fileName - Der zu prüfende Dateiname.
      Returns:
      true, wenn die Dateiendung in diesem Enum enthalten ist; andernfalls false.
    • allExtensions

      @API @Getter public static String[] allExtensions()
      Gibt alle unterstützten Dateiendungen als Feld/Array zurück.
      Returns:
      Ein Array aller unterstützten Dateiendungen.
    • fileExtension

      @Getter public String fileExtension()
      Gibt die kleingeschriebene Dateiendung mit Punkt aus (z.B. .ogg).
      Returns:
      Die kleingeschriebene Dateiendung mit Punkt (z.B. .ogg).