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

com.softicar.platform.common.ui.wiki.token.WikiTag Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
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);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy