Class UnsignedLongs

java.lang.Object
org.bson.internal.UnsignedLongs

@Deprecated(since="2022-10-31") public final class UnsignedLongs extends Object
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 Type
    Method
    Description
    static int
    compare(long first, long second)
    Deprecated.
    Equivalent of Long.compareUnsigned in Java 8.
    static long
    parse(String string)
    Deprecated.
    Equivalent to Long.parseUnsignedLong in Java 8.
    static String
    toString(long value)
    Deprecated.
    Equivalent to Long.toUnsignedString in Java 8.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • compare

      public static int compare(long first, long second)
      Deprecated.
      Equivalent of Long.compareUnsigned in Java 8.
      Parameters:
      first - the first value
      second - 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

      public static String toString(long value)
      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

      public static long parse(String string)
      Deprecated.
      Equivalent to Long.parseUnsignedLong in Java 8.
      Parameters:
      string - the string representation of an unsigned long
      Returns:
      the unsigned long