package com.iailab.netsdk.lib.enumeration;

/**
 * @author 251823
 * @description 膕�綺�─綣�
 * @date 2022/12/12 11:41:07
 */
public enum EM_STAT_GRANULARITY {
	/**
	 * ����
	 */
	EM_STAT_GRANULARITY_UNKNOWN(0, "����"),
	/**
	 * ����膕�綺�
	 */
	EM_STAT_GRANULARITY_MINUTE(1, "����膕�綺�");

	private int value;

	private String note;

	public String getNote() {
		return note;
	}

	public int getValue() {
		return value;
	}

	EM_STAT_GRANULARITY(int givenValue, String note) {
		this.value = givenValue;
		this.note = note;
	}

	public static String getNoteByValue(int givenValue) {
		for (EM_STAT_GRANULARITY enumType : EM_STAT_GRANULARITY.values()) {
			if (givenValue == enumType.getValue()) {
				return enumType.getNote();
			}
		}
		return null;
	}

	public static int getValueByNote(String givenNote) {
		for (EM_STAT_GRANULARITY enumType : EM_STAT_GRANULARITY.values()) {
			if (givenNote.equals(enumType.getNote())) {
				return enumType.getValue();
			}
		}
		return -1;
	}
}