com.softicar.platform.common.ui.wiki.token.WikiTag Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.ui.wiki.token;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
public enum WikiTag {
CODE(true),
ERROR,
INFO,
PRE(true),
WARNING;
private static final Map MAP = new TreeMap<>();
private final boolean rawText;
private WikiTag() {
this(false);
}
private WikiTag(boolean isRawText) {
this.rawText = isRawText;
}
public boolean isRawText() {
return rawText;
}
public static Optional getByName(String name) {
return Optional.ofNullable(MAP.get(name.toUpperCase()));
}
static {
for (WikiTag tagType: values()) {
MAP.put(tagType.name(), tagType);
}
}
}