package net.w_horse.excelpojo.xml.tag;

public enum DataDirection {
	NONE("none"), DOWN("down"), RIGHT("right");

	private String value;
	private DataDirection(String value) {
		this.value = value;
	}
	public String getValue() {
		return this.value;
	}
	public static String getTagName() {
		return "dataDirection";
	}

	public static boolean equalas(DataDirection elementName, String expr) {
		DataDirection retrieveTypeExpr = getElement(expr);
		return (retrieveTypeExpr == elementName);
	}

	public static boolean equalsIgnoreCase(DataDirection elementName, String expr) {
		DataDirection retrieveTypeExpr = getElementIgnoreCase(expr);
		return (retrieveTypeExpr == elementName);
	}
	public boolean equals(String expr) {
		return getValue().equals(expr);
	}
	public boolean equalsIgnoreCase(String expr) {
		return getValue().equalsIgnoreCase(expr);
	}

	private static DataDirection getElement(String elementName) {
		for (DataDirection retrieveType : values()) {
			if (retrieveType.equals(elementName)) {
				return retrieveType;
			}
		}
		return NONE;
	}
	private static DataDirection getElementIgnoreCase(String elementName) {
		for (DataDirection retrieveType : values()) {
			if (retrieveType.equalsIgnoreCase(elementName)) {
				return retrieveType;
			}
		}
		return NONE;
	}
}
