1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- package com.miniframe.generate.appcode;
- /**
- * 采样方法种类
- */
- public enum SamplingMethod {
- LatinHypercubeGenerator("LatinHypercubeGenerator", "0", "拉丁超立方"),
- BoxBehnkenGenerator("BoxBehnkenGenerator", "1", "BoxBehnken"),
- PlackettBurmanGenerator("PlackettBurmanGenerator", "2", "PlackettBurman"),
- FullFactorialGenerator("FullFactorialGenerator", "3", "全因子设计");
- // 成员变量
- private String index; // value
- private String name; // key
- private String desc; // 描述
-
- /**
- * 构造方法
- * @param name
- * @param index
- * @param desc
- */
- private SamplingMethod(String name, String index, String desc) {
- this.name = name;
- this.index = index;
- this.desc = desc;
- }
- /**
- * 通过index获取对象
- *
- * @param index
- * @return
- */
- public static SamplingMethod getSamplingMethod(String index) {
- for (SamplingMethod c : SamplingMethod.values()) {
- if (c.getIndex().equals(index)) {
- return c;
- }
- }
- return null;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getIndex() {
- return index;
- }
- public void setIndex(String index) {
- this.index = index;
- }
- public String getDesc() {
- return desc;
- }
- public void setDesc(String desc) {
- this.desc = desc;
- }
- }
|