org.apache.flink.configuration.Configuration.convertToDouble()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中org.apache.flink.configuration.Configuration.convertToDouble()方法的一些代码示例,展示了Configuration.convertToDouble()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.convertToDouble()方法的具体详情如下:
包路径:org.apache.flink.configuration.Configuration
类名称:Configuration
方法名:convertToDouble

Configuration.convertToDouble介绍

暂无

代码示例

代码示例来源:origin: apache/flink

/**
 * Returns the value associated with the given key as a double.
 *
 * @param key
 *        the key pointing to the associated value
 * @param defaultValue
 *        the default value which is returned in case there is no value associated with the given key
 * @return the (default) value associated with the given key
 */
public double getDouble(String key, double defaultValue) {
  Object o = getRawValue(key);
  if (o == null) {
    return defaultValue;
  }
  return convertToDouble(o, defaultValue);
}

代码示例来源:origin: apache/flink

/**
 * Returns the value associated with the given config option as a {@code double}.
 *
 * @param configOption The configuration option
 * @return the (default) value associated with the given config option
 */
@PublicEvolving
public double getDouble(ConfigOption<Double> configOption) {
  Object o = getValueOrDefaultFromOption(configOption);
  return convertToDouble(o, configOption.defaultValue());
}

代码示例来源:origin: apache/flink

/**
 * Returns the value associated with the given config option as a {@code double}.
 * If no value is mapped under any key of the option, it returns the specified
 * default instead of the option's default value.
 *
 * @param configOption The configuration option
 * @param overrideDefault The value to return if no value was mapper for any key of the option
 * @return the configured value associated with the given config option, or the overrideDefault
 */
@PublicEvolving
public double getDouble(ConfigOption<Double> configOption, double overrideDefault) {
  Object o = getRawValueFromOption(configOption);
  if (o == null) {
    return overrideDefault;
  }
  return convertToDouble(o, configOption.defaultValue());
}

代码示例来源:origin: com.alibaba.blink/flink-core

/**
 * Returns the value associated with the given key as a double.
 *
 * @param key
 *        the key pointing to the associated value
 * @param defaultValue
 *        the default value which is returned in case there is no value associated with the given key
 * @return the (default) value associated with the given key
 */
public double getDouble(String key, double defaultValue) {
  Object o = getRawValue(key);
  if (o == null) {
    return defaultValue;
  }
  return convertToDouble(o, defaultValue);
}

代码示例来源:origin: org.apache.flink/flink-core

/**
 * Returns the value associated with the given key as a double.
 *
 * @param key
 *        the key pointing to the associated value
 * @param defaultValue
 *        the default value which is returned in case there is no value associated with the given key
 * @return the (default) value associated with the given key
 */
public double getDouble(String key, double defaultValue) {
  Object o = getRawValue(key);
  if (o == null) {
    return defaultValue;
  }
  return convertToDouble(o, defaultValue);
}

代码示例来源:origin: org.apache.flink/flink-core

/**
 * Returns the value associated with the given config option as a {@code double}.
 *
 * @param configOption The configuration option
 * @return the (default) value associated with the given config option
 */
@PublicEvolving
public double getDouble(ConfigOption<Double> configOption) {
  Object o = getValueOrDefaultFromOption(configOption);
  return convertToDouble(o, configOption.defaultValue());
}

代码示例来源:origin: com.alibaba.blink/flink-core

/**
 * Returns the value associated with the given config option as a {@code double}.
 *
 * @param configOption The configuration option
 * @return the (default) value associated with the given config option
 */
@PublicEvolving
public double getDouble(ConfigOption<Double> configOption) {
  Object o = getValueOrDefaultFromOption(configOption);
  return convertToDouble(o, configOption.defaultValue());
}

代码示例来源:origin: org.apache.flink/flink-core

/**
 * Returns the value associated with the given config option as a {@code double}.
 * If no value is mapped under any key of the option, it returns the specified
 * default instead of the option's default value.
 *
 * @param configOption The configuration option
 * @param overrideDefault The value to return if no value was mapper for any key of the option
 * @return the configured value associated with the given config option, or the overrideDefault
 */
@PublicEvolving
public double getDouble(ConfigOption<Double> configOption, double overrideDefault) {
  Object o = getRawValueFromOption(configOption);
  if (o == null) {
    return overrideDefault;
  }
  return convertToDouble(o, configOption.defaultValue());
}

代码示例来源:origin: com.alibaba.blink/flink-core

/**
 * Returns the value associated with the given config option as a {@code double}.
 * If no value is mapped under any key of the option, it returns the specified
 * default instead of the option's default value.
 *
 * @param configOption The configuration option
 * @param overrideDefault The value to return if no value was mapper for any key of the option
 * @return the configured value associated with the given config option, or the overrideDefault
 */
@PublicEvolving
public double getDouble(ConfigOption<Double> configOption, double overrideDefault) {
  Object o = getRawValueFromOption(configOption);
  if (o == null) {
    return overrideDefault;
  }
  return convertToDouble(o, configOption.defaultValue());
}

相关文章

微信公众号

最新文章

更多