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"); } } }
public boolean getBoolean(ConfVars c) { return getBoolean(c.name(), c.getVarName(), c.getBooleanValue()); }
public float getFloat(ConfVars c) { return getFloat(c.name(), c.getVarName(), c.getFloatValue()); }
public long getLong(ConfVars c) { return getLong(c.name(), c.getVarName(), c.getLongValue()); }
public int getInt(ConfVars c) { return getInt(c.name(), c.getVarName(), c.getIntValue()); }
public String getString(ConfVars c) { return getString(c.name(), c.getVarName(), c.getStringValue()); }