Package org.bson.internal
Class UnsignedLongs
java.lang.Object
org.bson.internal.UnsignedLongs
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
Utilities for treating long values as unsigned.
Similar methods are now available in Java 8, but are required here for Java 6/7 compatibility.
This class is not part of the public API and may be removed or changed at any time.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcompare(long first, long second) Deprecated.Equivalent of Long.compareUnsigned in Java 8.static longDeprecated.Equivalent to Long.parseUnsignedLong in Java 8.static StringtoString(long value) Deprecated.Equivalent to Long.toUnsignedString in Java 8.
-
Method Details
-
compare
public static int compare(long first, long second) Deprecated.Equivalent of Long.compareUnsigned in Java 8.- Parameters:
first- the first valuesecond- the second value- Returns:
- 0 if the values are equal, a value greater than zero if first is greater than second, a value less than zero if first is less than second
-
toString
Deprecated.Equivalent to Long.toUnsignedString in Java 8.- Parameters:
value- the long value to treat as unsigned- Returns:
- the string representation of unsignedLong treated as an unsigned value
-
parse
Deprecated.Equivalent to Long.parseUnsignedLong in Java 8.- Parameters:
string- the string representation of an unsigned long- Returns:
- the unsigned long
-