Java Code Examples for java.util.concurrent.atomic.AtomicInteger#floatValue()

The following examples show how to use java.util.concurrent.atomic.AtomicInteger#floatValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AtomicIntegerComparisonExtensions.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** 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.floatValue() >= $2)", constantExpression = true)
public static boolean operator_greaterEqualsThan(AtomicInteger left, float right) {
	return left.floatValue() >= right;
}
 
Example 2
Source File: AtomicIntegerComparisonExtensions.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** 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.floatValue() <= $2)", constantExpression = true)
public static boolean operator_lessEqualsThan(AtomicInteger left, float right) {
	return left.floatValue() <= right;
}
 
Example 3
Source File: AtomicIntegerComparisonExtensions.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** 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;
}
 
Example 4
Source File: AtomicIntegerComparisonExtensions.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** 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;
}
 
Example 5
Source File: AtomicIntegerComparisonExtensions.java    From sarl with Apache License 2.0 2 votes vote down vote up
/**
 * 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;
}
 
Example 6
Source File: AtomicIntegerComparisonExtensions.java    From sarl with Apache License 2.0 2 votes vote down vote up
/** 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;
}