org.feijoas.mango.common.primitives

ULong

Related Docs: class ULong | package primitives

object ULong extends Serializable

Static utility methods pertaining to Long primitives that interpret values as unsigned (that is, any negative value x is treated as the positive value 2^64 + x).

In addition, this class provides several static methods for converting a Long to a String and a String to a Long that treat the Long as an unsigned number.

See the Guava User Guide article on unsigned primitive utilities.

Since

0.10 (copied from Guava-libraries)

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ULong
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val MaxValue: ULong

    Maximum value an ULong can represent

  5. implicit object ULongOrdering extends Ordering[ULong]

    Ordering that compares the two specified ULong values.

    Ordering that compares the two specified ULong values.

  6. def apply(value: BigInt): ULong

    Returns a ULong representing the same value as the specified BigInteger.

    Returns a ULong representing the same value as the specified BigInteger. This is the inverse operation of #toBigInt.

    Equivalent to valueOf(value)

    Exceptions thrown

    IllegalArgumentException if value is negative or value >= 2^64

  7. def apply(value: Long): ULong

    Returns an ULong representing the same value as the specified Long.

    Returns an ULong representing the same value as the specified Long.

    Equivalent to valueOf(value)

    Exceptions thrown

    IllegalArgumentException if value is negative

  8. implicit def asGuavaULong(ulong: ULong): AsJava[UnsignedLong]

    Adds an asJava method that converts a Mango ULong to a Guava UnsignedLong.

    Adds an asJava method that converts a Mango ULong to a Guava UnsignedLong.

    The returned Guava UnsignedLong contains a copy of the bits from Mango ULong.

    returns

    An object with an asJava method that returns a Guava UnsignedLong view of the argument

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. implicit def asMangoULong(ulong: UnsignedLong): AsScala[ULong]

    Adds an asScala method that converts a Guava UnsignedLong to a Mango ULong.

    Adds an asScala method that converts a Guava UnsignedLong to a Mango ULong.

    The returned Mango ULong contains a copy of the bits from Guava UnsignedLong.

    returns

    An object with an asScala method that returns a Mango ULong view of the argument

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def compare(a: ULong, b: ULong): Int

    Compares the two specified Long values, treating them as unsigned values between 0 and 2^64 - 1 inclusive.

    Compares the two specified Long values, treating them as unsigned values between 0 and 2^64 - 1 inclusive.

    a

    the first ULong to compare

    b

    the second ULong to compare

    returns

    a negative value if a is less than b; a positive value if a is greater than b; or zero if they are equal

  13. def decode(stringValue: String): ULong

    Returns the ULong value represented by the given string.

    Returns the ULong value represented by the given string.

    Accepts a decimal, hexadecimal, or octal number given by specifying the following prefix:

    • 0x HexDigits
    • 0X HexDigits
    • # HexDigits
    • 0 OctalDigits
    Exceptions thrown

    NumberFormatException if the string does not contain a valid ULong value

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def fromLongBits(bits: Long): ULong

    Returns an ULong corresponding to a given bit representation.

    Returns an ULong corresponding to a given bit representation. The argument is interpreted as an unsigned 64-bit value. Specifically, the sign bit of bits is interpreted as a normal bit, and all other bits are treated as usual.

    If the argument is nonnegative, the returned result will be equal to bits, otherwise, the result will be equal to 2^64 + bits.

    To represent decimal constants less than 2^63, consider #valueOf(long) instead.

  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def join(separator: String, array: ULong*): String

    Returns a string containing the supplied ULong values separated by separator.

    Returns a string containing the supplied ULong values separated by separator. For example, join("-", 1, 2, 3) returns the string "1-2-3".

    separator

    the text that should appear between consecutive values in the resulting string (but not at the start or end)

    array

    an array of ULong values, possibly empty

  22. def lexicographicalComparator(): Ordering[Array[ULong]]

    Returns a comparator that compares two arrays of ULong values lexicographically.

    Returns a comparator that compares two arrays of ULong values lexicographically. That is, it compares, using #compare(long, long), the first pair of values that follow any common prefix, or when one array is a prefix of the other, treats the shorter array as the lesser. For example, [] < [1L] < [1L, 2L] < [2L] < [1L << 63].

    See also

    Lexicographical order article at Wikipedia

  23. def max(array: ULong*): ULong

    Returns the greatest value present in array, treating values as unsigned.

    Returns the greatest value present in array, treating values as unsigned.

    array

    a nonempty array of ULong values

    returns

    the value present in array that is greater than or equal to every other value in the array according to #compare

    Exceptions thrown

    IllegalArgumentException if array is empty

  24. def min(array: ULong*): ULong

    Returns the least value present in array, treating values as unsigned.

    Returns the least value present in array, treating values as unsigned.

    array

    a nonempty array of ULong values

    returns

    the value present in array that is less than or equal to every other value in the array according to #compare

    Exceptions thrown

    IllegalArgumentException if array is empty

  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. def valueOf(string: String, radix: Int): ULong

    Returns an ULong holding the value of the specified String, parsed as an ULong value in the specified radix.

    Returns an ULong holding the value of the specified String, parsed as an ULong value in the specified radix.

    Exceptions thrown

    NumberFormatException if the string does not contain a parsable ULong value, or radix is not between Character#MIN_RADIX and Character#MAX_RADIX

  31. def valueOf(string: String): ULong

    Returns an ULong holding the value of the specified String, parsed as an ULong value.

    Returns an ULong holding the value of the specified String, parsed as an ULong value.

    Exceptions thrown

    NumberFormatException if the string does not contain a parsable ULong value

  32. def valueOf(value: BigInt): ULong

    Returns a ULong representing the same value as the specified BigInteger.

    Returns a ULong representing the same value as the specified BigInteger. This is the inverse operation of #toBigInt.

    Exceptions thrown

    IllegalArgumentException if value is negative or value >= 2^64

  33. def valueOf(value: Long): ULong

    Returns an ULong representing the same value as the specified Long.

    Returns an ULong representing the same value as the specified Long.

    Exceptions thrown

    IllegalArgumentException if value is negative

  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped