java.util.concurrent.atomic.AtomicInteger#longValue()源码实例Demo

下面列出了java.util.concurrent.atomic.AtomicInteger#longValue() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: marklogic-contentpump   文件: LocalJobRunner.java
public double computeProgress() {
    if (progress.length == 0) {
        return (double)1;
    }
    long result = 0;
    for (AtomicInteger pct : progress) {
        result += pct.longValue();
    }
    return (double)result / progress.length / 100;
}
 
public void publishMetricEvent(MetricType metricType, AtomicInteger atomicTimeoutGauge) {
  final long gaugeValue = (atomicTimeoutGauge == null) ? -1 : atomicTimeoutGauge.longValue();
  MetricEvent metricEvent = new MetricEvent(this, metricType, gaugeValue, null);
  publisher.publishEvent(metricEvent);
}
 
源代码3 项目: sarl   文件: AtomicIntegerCastExtensions.java
/** Convert the given value to {@code AtomicLong}. This function is not null-safe.
 *
 * @param number a number of {@code AtomicInteger} type.
 * @return the equivalent value to {@code number} of {@code AtomicLong} type.
 */
@Pure
@Inline(value = "new $2($1.longValue())", imported = AtomicLong.class)
public static AtomicLong toAtomicLong(AtomicInteger number) {
	return new AtomicLong(number.longValue());
}
 
源代码4 项目: sarl   文件: AtomicIntegerComparisonExtensions.java
/** The binary {@code greaterEqualsThan} operator. This is the equivalent
 * to the Java {@code >=} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left>=right}
 */
@Pure
@Inline(value = "($1.longValue() >= $2)", constantExpression = true)
public static boolean operator_greaterEqualsThan(AtomicInteger left, long right) {
	return left.longValue() >= right;
}
 
源代码5 项目: sarl   文件: AtomicIntegerComparisonExtensions.java
/** The binary {@code lessEqualsThan} operator. This is the equivalent
 * to the Java {@code <=} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left<=right}
 */
@Pure
@Inline(value = "($1.longValue() <= $2)", constantExpression = true)
public static boolean operator_lessEqualsThan(AtomicInteger left, long right) {
	return left.longValue() <= right;
}
 
源代码6 项目: sarl   文件: AtomicIntegerComparisonExtensions.java
/** 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.longValue() > $2)", constantExpression = true)
public static boolean operator_greaterThan(AtomicInteger left, long right) {
	return left.longValue() > right;
}
 
源代码7 项目: sarl   文件: AtomicIntegerComparisonExtensions.java
/** 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.longValue() < $2)", constantExpression = true)
public static boolean operator_lessThan(AtomicInteger left, long right) {
	return left.longValue() < right;
}
 
源代码8 项目: sarl   文件: AtomicIntegerComparisonExtensions.java
/**
 * 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.longValue() == $2) : false)", constantExpression = true)
public static boolean operator_equals(AtomicInteger left, long right) {
	return left != null ? left.longValue() == right : false;
}
 
源代码9 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code multiply} operator. This is the equivalent to
 * the Java {@code *} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left*right}
 */
@Pure
@Inline(value = "($1.intValue() * $2.longValue())", constantExpression = true)
public static long operator_multiply(AtomicInteger left, AtomicLong right) {
	return left.longValue() * right.longValue();
}
 
源代码10 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code minus} operator. This is the equivalent to
 * the Java {@code -} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left-right}
 */
@Pure
@Inline(value = "($1.intValue() - $2)", constantExpression = true)
public static long operator_minus(AtomicInteger left, long right) {
	return left.longValue() - right;
}
 
源代码11 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code minus} operator. This is the equivalent to
 * the Java {@code -} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left-right}
 */
@Pure
@Inline(value = "($1.intValue() - $2.longValue())", constantExpression = true)
public static long operator_minus(AtomicInteger left, Long right) {
	return left.longValue() - right.longValue();
}
 
源代码12 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code modulo} operator. This is the equivalent to
 * the Java {@code %} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left%right}
 */
@Pure
@Inline(value = "($1.intValue() % $2.longValue())", constantExpression = true)
public static long operator_modulo(AtomicInteger left, Long right) {
	return left.longValue() % right.longValue();
}
 
源代码13 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code modulo} operator. This is the equivalent to
 * the Java {@code %} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left%right}
 */
@Pure
@Inline(value = "($1.intValue() % $2)", constantExpression = true)
public static long operator_modulo(AtomicInteger left, long right) {
	return left.longValue() % right;
}
 
源代码14 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code plus} operator. This is the equivalent to
 * the Java {@code +} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left+right}
 */
@Pure
@Inline(value = "($1.intValue() + $2.longValue())", constantExpression = true)
public static long operator_plus(AtomicInteger left, Long right) {
	return left.longValue() + right.longValue();
}
 
源代码15 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code plus} operator. This is the equivalent to
 * the Java {@code +} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left+right}
 */
@Pure
@Inline(value = "($1.intValue() + $2.longValue())", constantExpression = true)
public static long operator_plus(AtomicInteger left, AtomicLong right) {
	return left.longValue() + right.longValue();
}
 
源代码16 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code divide} operator. This is the equivalent to
 * the Java {@code /} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left/right}
 */
@Pure
@Inline(value = "($1.intValue() / $2)", constantExpression = true)
public static long operator_divide(AtomicInteger left, long right) {
	return left.longValue() / right;
}
 
源代码17 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code divide} operator. This is the equivalent to
 * the Java {@code /} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left/right}
 */
@Pure
@Inline(value = "($1.intValue() / $2.longValue())", constantExpression = true)
public static long operator_divide(AtomicInteger left, Long right) {
	return left.longValue() / right.longValue();
}
 
源代码18 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code divide} operator. This is the equivalent to
 * the Java {@code /} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left/right}
 */
@Pure
@Inline(value = "($1.intValue() / $2.longValue())", constantExpression = true)
public static long operator_divide(AtomicInteger left, AtomicLong right) {
	return left.longValue() / right.longValue();
}
 
源代码19 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code multiply} operator. This is the equivalent to
 * the Java {@code *} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left*right}
 */
@Pure
@Inline(value = "($1.intValue() * $2)", constantExpression = true)
public static long operator_multiply(AtomicInteger left, long right) {
	return left.longValue() * right;
}
 
源代码20 项目: sarl   文件: AtomicIntegerArithmeticExtensions.java
/** The binary {@code multiply} operator. This is the equivalent to
 * the Java {@code *} operator. This function is not null-safe.
 *
 * @param left a number.
 * @param right a number.
 * @return {@code left*right}
 */
@Pure
@Inline(value = "($1.intValue() * $2.longValue())", constantExpression = true)
public static long operator_multiply(AtomicInteger left, Long right) {
	return left.longValue() * right.longValue();
}