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 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);
	}
	private static DataDirection getElement(String elementName) {
		if (elementName.equals(DOWN.getValue())) {
			return DOWN;
		} else if (elementName.equals(RIGHT.getValue())) {
			return RIGHT;
		} else {
			return NONE;
		}
	}
	private static DataDirection getElementIgnoreCase(String elementName) {
		if (elementName.equalsIgnoreCase(DOWN.getValue())) {
			return DOWN;
		} else if (elementName.equalsIgnoreCase(RIGHT.getValue())) {
			return RIGHT;
		} else {
			return NONE;
		}
	}
	public static String getTagName() {
		return "dataDirection";
	}
}
