anotherim/src/main/java/eu/siacs/conversations/xmpp/jingle/Media.java

21 lines
471 B
Java
Raw Normal View History

2020-04-15 08:49:38 +00:00
package eu.siacs.conversations.xmpp.jingle;
import java.util.Locale;
public enum Media {
VIDEO, AUDIO, UNKNOWN;
@Override
public String toString() {
return super.toString().toLowerCase(Locale.ROOT);
}
public static Media of(String value) {
try {
return value == null ? UNKNOWN : Media.valueOf(value.toUpperCase(Locale.ROOT));
} catch (IllegalArgumentException e) {
return UNKNOWN;
}
}
}