package kr.co.hanwha.hifive.data.model;

/**
 * Spinner 에서 사용하는 기본 데이터 셋
 * Created by sanghoonkwon on 2018. 2. 20..
 */

public class SpinnerData {
    String key;
    Object value;

    public SpinnerData() {
        this.key = "";
        this.value = null;
    }

    public SpinnerData(String key, Object value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public Object getValue() {
        return value;
    }

    public String getStringValue() {
        return value instanceof String ? (String) value : "";
    }

    @Override
    public String toString() {
        return "SpinnerData{" +
                "key='" + key + '\'' +
                ", value=" + value +
                '}';
    }
}
