package kr.co.hanwha.hifive.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by aaron on 23/10/2018
 */
public enum ViewHolderSearchType {

  /**
   * 카테고리 타이틀
   */
  TITLE(10),
  /**
   * 더보기
   */
  MORE(20),
  /**
   * 멤버
   */
  MEMBER(30),
  /**
   * To-Do
   */
  TODO(40),
  /**
   * 유닛
   */
  UNIT(50);

  int type;
  private static Map map = new HashMap<>();

  ViewHolderSearchType(int type) {
    this.type = type;
  }

  public int getCode() {
    return type;
  }

  static {
    for (ViewHolderSearchType type : values()) {
      map.put(type.type, type);
    }
  }

  public static ViewHolderSearchType valueOf(int value) {
    return (ViewHolderSearchType) map.get(value);
  }
}
