Package com.couchbase.client.dcp.util
Class MathUtils
java.lang.Object
com.couchbase.client.dcp.util.MathUtils
Various math utility methods, also backports from later JDK versions.
- Since:
- 0.10.0
- Author:
- Sergey Avseyev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
compareLong
(long x, long y) Deprecated.static int
compareUnsignedLong
(long x, long y) Deprecated.In favor ofLong.compareUnsigned(long, long)
static boolean
lessThanUnsigned
(long x, long y) Compares two numbers as unsigned 64-bit integers.
-
Constructor Details
-
MathUtils
public MathUtils()
-
-
Method Details
-
lessThanUnsigned
public static boolean lessThanUnsigned(long x, long y) Compares two numbers as unsigned 64-bit integers.- Parameters:
x
- left operandy
- right operand- Returns:
- true if x is less than y
-
compareLong
Deprecated.In favor ofLong.compare(long, long)
Backport ofLong.compare
from Java 7. -
compareUnsignedLong
Deprecated.In favor ofLong.compareUnsigned(long, long)
Backport ofLong.compareUnsigned
from Java 8.
-
Long.compare(long, long)