Storm設定オブジェクトから文字列型の設定値を取得する。<br>
存在しない場合はデフォルト値を返す。

@param stormConf Storm設定オブジェクト
@param key 設定値のキー
@param defaultValue デフォルト値
@return 個別設定値(int型)
195753
public static int getIntValue(Config stormConf, String key, int defaultValue)
    {
        Object config = stormConf.get(key);

        if (config == null)
        {
            return defaultValue;
        }

        return Integer.parseInt(config.toString());
    }
1015964
public int getInt(int key, int defaultValue) {
        if (key < 0) Kit.codeBug();
        int index = findIndex(key);
        if (0 <= index) {
            if (ivaluesShift != 0) {
                return keys[ivaluesShift + index];
            }
            return 0;
        }
        return defaultValue;
    }
1268700
public String getKeyOrDefault(String key) {
        if (StringUtils.isBlank(key)) {
            if (this.hasDefaultEnvironment()) {
                return defaultEnvironment;
            } else {
                throw new MultiEnvSupportException("[environment] property is mandatory and can't be empty");
            }
        }
        if (map.containsKey(key)) {
            return key;
        }
        if (this.hasTemplateEnvironment()) {
            return this.templateEnvironment;
        }
        LOG.error("Failed to find environment [{}] in {}", key, this.keySet());
        throw new MultiEnvSupportException(String.format(
                "Failed to find configuration for environment %s", key));
    }
633330
private void setupStormCode(String topologyId, String tmpJarLocation,
                                Map<Object, Object> stormConf, StormTopology topology, boolean update)
            throws Exception {
        String codeKey = StormConfig.master_stormcode_key(topologyId);
        String confKey = StormConfig.master_stormconf_key(topologyId);
        String codeKeyBak = StormConfig.master_stormcode_bak_key(topologyId);

        // in local mode there is no jar
        if (tmpJarLocation != null) {
            setupJar(tmpJarLocation, topologyId, update);
        }

        if (update) {
            backupBlob(codeKey, codeKeyBak, topologyId);
        }
        createOrUpdateBlob(confKey, Utils.serialize(stormConf), update, topologyId);
        createOrUpdateBlob(codeKey, Utils.serialize(topology), update, topologyId);
    }
586900
public static String defaultValue(String key) {
		String value;
		HashMap<String, String> defaultValues;
		defaultValues = new HashMap<String, String>();
		defaultValues.put("slcly", "12.6");
		defaultValues.put("salb", "0.25");
		defaultValues.put("slphw", "6.2");
		defaultValues.put("sksat", "0.0");
		defaultValues.put("caco3", "0.0");
		defaultValues.put("sloc", "0.1");
		defaultValues.put("slll", "0.0");
		defaultValues.put("icnh4", "0.0");
		defaultValues.put("icno3", "0.0");
		defaultValues.put("ich2o", "0.0");

		if (defaultValues.containsKey(key)) {
			value = defaultValues.get(key);
		} else {
			value = UNKNOWN_DEFAULT_VALUE;
		}

		return value;
	}
991696
public Integer loadPreferenceAsInteger(String key, Integer defaultValue) {
		Integer value = defaultValue;
		if (hasPreference(key)) {
			value = getSharedPreferences().getInt(key, 0);
		}
		logLoad(key, value);
		return value;
	}
834492
public static Object findMapValueByKey(Object key, Map<?, ?> map,
	Object defaultValue)
	{
		if (key == null || map == null)
			return defaultValue;

		Object value = map.get(key);

		if (value == null)
			return defaultValue;

		return value;
	}
611768
@SuppressWarnings("rawtypes")
    @Override
    public void prepare(Map stormConf, TopologyContext context, OutputCollector collector)
    {
        super.prepare(stormConf, context, collector);

        this.taskId = context.getThisComponentId() + "_" + context.getThisTaskId();

        if (this.reloadConfig)
        {
            if (stormConf.containsKey(StormConfigGenerator.INIT_CONFIG_KEY))
            {
                String watchPath = stormConf.get(StormConfigGenerator.INIT_CONFIG_KEY).toString();
                String logFormat = "Config reload watch start. : WatchPath={0}, Interval(Sec)={1}";
                logger.info(MessageFormat.format(logFormat, watchPath, this.reloadConfigIntervalSec));

                this.watcher = new ConfigFileWatcher(watchPath, this.reloadConfigIntervalSec);
                this.watcher.init();
            }
        }

        onPrepare(stormConf, context);
    }
628350
public static <K, V> V getOrDefault(final Map<K, V> map, final Object key, final V defaultValue) {
        if (N.isNullOrEmpty(map)) {
            return defaultValue;
        }

        final V val = map.get(key);

        if (val != null || map.containsKey(key)) {
            return val;
        } else {
            return defaultValue;
        }
    }
1258512
public org.tensorflow.framework.AttrValue getAttrOrDefault(
      java.lang.String key,
      org.tensorflow.framework.AttrValue defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.framework.AttrValue> map =
        internalGetAttr().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
1258145
public int getInteger(String key, int defaultValue) {
        int result = defaultValue;
        try {
            if (key != null)
                result = getInteger(key);
        } catch (MissingResourceException e) {
        }
        return result;
    }
17719
public java.lang.String getTagsOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetTags().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
1372318
public long getCapacityBytesOnTiersOrDefault(
      java.lang.String key,
      long defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.Long> map =
        internalGetCapacityBytesOnTiers().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
1014878
public String get(String key, String defaultValue) {
		addToDefaults(key, defaultValue);
		String value = get(key);
		if (value == null) {
			return defaultValue;
		} else {
			return value;
		}
	}
579473
@SuppressWarnings("unchecked")
    public static List<String> getStringListValue(Config stormConf, String key)
    {
        List<String> configList = (List<String>) stormConf.get(key);

        if (configList == null)
        {
            configList = new ArrayList<String>();
        }

        return configList;
    }
783410
public String optString(String key, String defaultValue) {
    Object o = opt(key);
    return o != null ? o.toString() : defaultValue;
  }
474060
public byte getByte(String key, byte defaultValue) {
		addToDefaults(key, Byte.toString(defaultValue));
		String value = get(key);
		if (value == null) {
			return defaultValue;
		} else {
			return Byte.valueOf(value);
		}
	}