java.util.concurrent.atomic.AtomicInteger.floatValue()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(108)

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

AtomicInteger.floatValue介绍

[英]Returns the value of this AtomicInteger as a floatafter a widening primitive conversion.
[中]在扩大原语转换后,以浮点形式返回此AtomicInteger的值。

代码示例

代码示例来源:origin: Graylog2/graylog2-server

@Override
public int getProgress() {
  if (indicesToCalculate <= 0) {
    return 0;
  }
  // lolwtfbbqcasting
  return (int) Math.floor((indicesCalculated.floatValue() / (float) indicesToCalculate) * 100);
}

代码示例来源:origin: net.oschina.jmind/jmind-base

public float floatValue() {
  return i.floatValue();
}

代码示例来源:origin: org.apache.tez/tez-runtime-library

public float getNumCompletedInputsFloat() {
 return numCompletedInputs.floatValue();
}

代码示例来源:origin: remoting/dubbox

public float floatValue() {
  return i.floatValue();
}

代码示例来源:origin: remoting/dubbox

public float floatValue() {
  return i.floatValue();
}

代码示例来源:origin: xuminwlt/j360-datasource

public float floatValue() {
  return i.floatValue();
}

代码示例来源:origin: darren-fu/pampas

public float floatValue() {
  return i.floatValue();
}

代码示例来源:origin: wu-sheng/DataCarrier

public float floatValue() {
  return this.value.floatValue();
}

代码示例来源:origin: org.graylog2/graylog2-server

@Override
public int getProgress() {
  if (indicesToCalculate <= 0) {
    return 0;
  }
  // lolwtfbbqcasting
  return (int) Math.floor((indicesCalculated.floatValue() / (float) indicesToCalculate) * 100);
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang.core

/** The binary {@code greaterThan} operator. This is the equivalent
 * to the Java {@code &gt;} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left&gt;right}
 */
@Pure
@Inline(value = "($1.floatValue() > $2)", constantExpression = true)
public static boolean operator_greaterThan(AtomicInteger left, float right) {
  return left.floatValue() > right;
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang.core

/**
 * The binary {@code equals} operator. This is the equivalent to the Java {@code ==} operator.
 * This function is null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left==right}
 */
@Pure
@Inline(value = "($1 != null ? ($1.floatValue() == $2) : false)", constantExpression = true)
public static boolean operator_equals(AtomicInteger left, float right) {
  return left != null ? left.floatValue() == right : false;
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang.core

/** The binary {@code greaterEqualsThan} operator. This is the equivalent
 * to the Java {@code &gt;=} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left&gt;=right}
 */
@Pure
@Inline(value = "($1.floatValue() >= $2)", constantExpression = true)
public static boolean operator_greaterEqualsThan(AtomicInteger left, float right) {
  return left.floatValue() >= right;
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang.core

/** The binary {@code lessThan} operator. This is the equivalent to
 * the Java {@code &lt;} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left&lt;right}
 */
@Pure
@Inline(value = "($1.floatValue() < $2)", constantExpression = true)
public static boolean operator_lessThan(AtomicInteger left, float right) {
  return left.floatValue() < right;
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang.core

/** The binary {@code notEquals} operator. This is the equivalent
 * to the Java {@code !=} operator. This function is null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left!=right}
 */
@Pure
@Inline(value = "($1 == null ? false : ($1.floatValue() != $2))", constantExpression = true)
public static boolean operator_notEquals(AtomicInteger left, float right) {
  return left == null ? false : left.floatValue() != right;
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang.core

/** Convert the given value to {@code float}. This function is not null-safe.
 *
 * @param number a number of {@code AtomicInteger} type.
 * @return the equivalent value to {@code number} of {@code float} type.
 */
@Pure
@Inline(value = "$1.floatValue()")
public static float toFloat(AtomicInteger number) {
  return number.floatValue();
}

代码示例来源:origin: io.sarl.lang/io.sarl.lang.core

/** The binary {@code lessEqualsThan} operator. This is the equivalent
 * to the Java {@code &lt;=} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left&lt;=right}
 */
@Pure
@Inline(value = "($1.floatValue() <= $2)", constantExpression = true)
public static boolean operator_lessEqualsThan(AtomicInteger left, float right) {
  return left.floatValue() <= right;
}

代码示例来源:origin: shibing624/similarity

protected void taggingWeightByFrequency(List<Word> words1, List<Word> words2) {
  if (words1.get(0).getWeight() != null || words2.get(0).getWeight() != null) {
    return;
  }
  Map<String, AtomicInteger> frequency1 = getFrequency(words1);
  Map<String, AtomicInteger> frequency2 = getFrequency(words2);
  //输出词频统计信息
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("词频统计1:\n{}", getWordsFrequencyString(frequency1));
    LOGGER.debug("词频统计2:\n{}", getWordsFrequencyString(frequency2));
  }
  // 标注权重
  words1.parallelStream().forEach(word -> word.setWeight(frequency1.get(word.getName()).floatValue()));
  words2.parallelStream().forEach(word -> word.setWeight(frequency2.get(word.getName()).floatValue()));
}

代码示例来源:origin: com.b2international.snowowl/com.b2international.snowowl.datastore.server

int modulo = (int) (totalWork / (100.0f - currentPercent.floatValue()));
if (0 == modulo) { //total work is too few
  modulo = 1;

相关文章