All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.soento.core.enums.Audio Maven / Gradle / Ivy

package com.soento.core.enums;

/**
 * 音频类型
 *
 * @author soento
 */
public enum Audio {
    /**
     * .mp3
     */
    MP3(".mp3"),
    /**
     * .ogg
     */
    OGG(".ogg"),
    /**
     * .mov
     */
    MOV(".mov"),
    /**
     * .wav
     */
    WAV(".wav"),
    /**
     * .mid
     */
    MID(".mid");

    private final String value;

    private Audio(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static boolean has(String extension) {
        Audio[] as = Audio.values();
        for (Audio a : as) {
            if (a.getValue().equalsIgnoreCase(extension)) {
                return true;
            }
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy