package com.smppw.common.pojo;

import java.util.stream.Stream;

/**
 * @author zhengsongliang
 */
public enum IndicatorCalcType {
	Curve(1), Average(2);
	private int id;

	private IndicatorCalcType(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public static IndicatorCalcType getReturnRiskCalcType(int id) {
		return Stream.of(IndicatorCalcType.values()).filter(e -> e.id == id).findFirst().orElse(null);
	}
}
