package com.yihu.wlyy.analysis.etl;

/**
 * Created by lyr-pc on 2017/2/20.
 */
public class ETLConstantData {

    /**
     * 性别
     *
     * @return
     */
    public static String sexName(int sex) {
        switch (sex) {
            case 1:
                return "男";
            case 2:
                return "女";
            default:
                return "其他";
        }
    }

    /**
     * 年龄段
     *
     * @param age
     * @return
     */
    public static String ageInterval(int age) {
        if (age < 7) {
            return "儿童";
        } else if (age >= 7 && age <= 14) {
            return "少年";
        } else if (age >= 15 && age <= 35) {
            return "青年";
        } else if (age >= 36 && age <= 60) {
            return "中年";
        } else {
            return "老年";
        }
    }
}
