Пример #1
0
 public ZeppelinConfiguration() {
   ConfVars[] vars = ConfVars.values();
   for (ConfVars v : vars) {
     if (v.getType() == ConfVars.VarType.BOOLEAN) {
       this.setProperty(v.getVarName(), v.getBooleanValue());
     } else if (v.getType() == ConfVars.VarType.LONG) {
       this.setProperty(v.getVarName(), v.getLongValue());
     } else if (v.getType() == ConfVars.VarType.INT) {
       this.setProperty(v.getVarName(), v.getIntValue());
     } else if (v.getType() == ConfVars.VarType.FLOAT) {
       this.setProperty(v.getVarName(), v.getFloatValue());
     } else if (v.getType() == ConfVars.VarType.STRING) {
       this.setProperty(v.getVarName(), v.getStringValue());
     } else {
       throw new RuntimeException("Unsupported VarType");
     }
   }
 }
Пример #2
0
 public boolean getBoolean(ConfVars c) {
   return getBoolean(c.name(), c.getVarName(), c.getBooleanValue());
 }
Пример #3
0
 public float getFloat(ConfVars c) {
   return getFloat(c.name(), c.getVarName(), c.getFloatValue());
 }
Пример #4
0
 public long getLong(ConfVars c) {
   return getLong(c.name(), c.getVarName(), c.getLongValue());
 }
Пример #5
0
 public int getInt(ConfVars c) {
   return getInt(c.name(), c.getVarName(), c.getIntValue());
 }
Пример #6
0
 public String getString(ConfVars c) {
   return getString(c.name(), c.getVarName(), c.getStringValue());
 }