package com.zhiqiyun.open.core.enmus;


/**
 * @author jtoms
 */

public enum Gender implements IBaseEnum {
    /**
     *
     */
    secret(0, "保密"), male(1, "男"), female(2, "女");

    private final int value;
    private final String text;

    Gender(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public static Gender valueOf(int code) {
        Gender[] values = Gender.values();
        for (Gender type : values) {
            if (type.value == code) {
                return type;
            }
        }
        return null;
    }

    public String getText() {
        return text;
    }

    public Integer getValue() {
        return value;
    }

    @Override
    public String getName() {
        return this.name();
    }
}
