org.feijoas.mango.common.primitives

UInt

Related Docs: class UInt | package primitives

object UInt extends Serializable

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

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. UInt
  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: UInt

    Maximum value an UInt can represent

  5. implicit object UIntOrdering extends Ordering[UInt]

    Ordering that compares the two specified UInt values.

    Ordering that compares the two specified UInt values.

  6. def apply(value: BigInt): UInt

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

    Returns a UInt 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^32

  7. def apply(value: Long): UInt

    Returns an UInt that is equal to value, if possible.

    Returns an UInt that is equal to value, if possible. The inverse operation of #toLong.

    Equivalent to valueOf(value)

  8. implicit def asGuavaUInt(uint: UInt): AsJava[UnsignedInteger]

    Adds an asJava method that converts a Mango UInt to a Guava UnsignedInteger.

    Adds an asJava method that converts a Mango UInt to a Guava UnsignedInteger.

    The returned Guava UnsignedInteger contains a copy of the bits from Mango UInt.

    uint

    the Mango UInt to convert to a Guava UnsignedInteger

    returns

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

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. implicit def asMangoUInt(uint: UnsignedInteger): AsScala[UInt]

    Adds an asScala method that converts a Guava UnsignedInteger to a Mango UInt.

    Adds an asScala method that converts a Guava UnsignedInteger to a Mango UInt.

    The returned Mango UInt contains a copy of the bits from Guava UnsignedInteger.

    uint

    the Guava UnsignedInteger to convert to a Mango UInt

    returns

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

  11. def clone(): AnyRef

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

    Compares the two specified UInt values.

    Compares the two specified UInt values.

    a

    the first UInt to compare

    b

    the second UInt 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): UInt

    Returns the UInt value represented by the given string.

    Returns the UInt 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 unsigned Int 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 fromIntBits(bits: Int): UInt

    Returns an UInt corresponding to a given bit representation.

    Returns an UInt corresponding to a given bit representation. The argument is interpreted as an unsigned 32-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^32 + bits.

    To represent unsigned decimal constants, 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: UInt*): String

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

    Returns a string containing the supplied UInt 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 unsigned UInt values, possibly empty

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

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

    Returns a comparator that compares two arrays of UInt values lexicographically. That is, it compares, using #compare(UInt, UInt)), 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, [] < [1] < [1, 2] < [2] < [1 << 31].

    The returned comparator is inconsistent with Any#equals(OAny) (since arrays support only identity equality), but it is consistent with Arrays#equals(UInt[], UInt[]).

    See also

    Lexicographical order article at Wikipedia

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

    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 unsigned int 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: UInt*): UInt

    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 unsigned int 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): UInt

    Returns the UInt value represented by a string with the given radix.

    Returns the UInt value represented by a string with the given radix.

    string

    the string containing the unsigned integer representation to be parsed.

    radix

    the radix to use while parsing string; must be between Character#MIN_RADIX and Character#MAX_RADIX.

    Exceptions thrown

    NullPointerException if string is null

    NumberFormatException if the string does not contain a valid unsigned Int, or if supplied radix is invalid.

  31. def valueOf(string: String): UInt

    Returns the UInt value represented by the given decimal string.

    Returns the UInt value represented by the given decimal string.

    Exceptions thrown

    NullPointerException if string is null

    NumberFormatException if the string does not contain a valid unsigned Int value

  32. def valueOf(value: BigInt): UInt

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

    Returns a UInt 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^32

  33. def valueOf(value: Long): UInt

    Returns an UInt that is equal to value, if possible.

    Returns an UInt that is equal to value, if possible. The inverse operation of #toLong.

  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