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 intcompareLong(long x, long y) Deprecated.static intcompareUnsignedLong(long x, long y) Deprecated.In favor ofLong.compareUnsigned(long, long)static booleanlessThanUnsigned(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.comparefrom Java 7. -
compareUnsignedLong
Deprecated.In favor ofLong.compareUnsigned(long, long)Backport ofLong.compareUnsignedfrom Java 8.
-
Long.compare(long, long)