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 String value;

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

    public String getValue() {
        return value;
    }

    public static boolean has(String value) {
        if (Audio.MP3.getValue().equalsIgnoreCase(value)) {
            return true;
        } else if (Audio.OGG.getValue().equalsIgnoreCase(value)) {
            return true;
        } else if (Audio.MOV.getValue().equalsIgnoreCase(value)) {
            return true;
        } else if (Audio.WAV.getValue().equalsIgnoreCase(value)) {
            return true;
        } else if (Audio.MID.getValue().equalsIgnoreCase(value)) {
            return true;
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy