org.feijoas.mango.common.primitives

UByte

Related Docs: class UByte | package primitives

object UByte extends Serializable

Static utility methods pertaining to byte primitives that interpret values as unsigned (that is, any negative value b is treated as the positive value 256 + b).

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. UByte
  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 MaxPowerOfTwo: Byte

    The largest power of two that can be represented as an unsigned Byte.

    The largest power of two that can be represented as an unsigned Byte.

  5. val MaxValue: Byte

    The largest value that fits into an unsigned Byte.

  6. implicit object UByteOrdering extends Ordering[UByte]

    Ordering that compares the two specified UByte values.

    Ordering that compares the two specified UByte values.

  7. def apply(value: Long): UByte

    Returns the UByte value that, when treated as unsigned, is equal to value, if possible.

    Returns the UByte value that, when treated as unsigned, is equal to value, if possible.

    Equivalent to valueOf(value)

    value

    a value between 0 and 255 inclusive

    returns

    the UByte value that, when treated as unsigned, equals value

    Exceptions thrown

    IllegalArgumentException if value is negative or greater than 255

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

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

    Compares the two specified UByte values, treating them as unsigned values between 0 and 255 inclusive.

    Compares the two specified UByte values, treating them as unsigned values between 0 and 255 inclusive. For example, (Byte) -127 is considered greater than (Byte) 127 because it is seen as having the value of positive 129.

    a

    the first UByte to compare

    b

    the second UByte 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

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fromByteBits(bits: Byte): UByte

    Returns an UByte corresponding to a given bit representation.

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

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

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

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

    Definition Classes
    Any
  18. def join(separator: String, array: UByte*): String

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

    Returns a string containing the supplied UByte values separated by separator. For example, join(":", (Byte) 1, (Byte) 2, (Byte) 255) returns the string "1:2:255".

    separator

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

    array

    an array of UByte values, possibly empty

  19. def lexicographicalComparator(): Ordering[Array[UByte]]

    Returns a comparator that compares two UByte arrays lexicographically.

    Returns a comparator that compares two UByte arrays lexicographically. That is, it compares, using #compare(Byte, Byte)), 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, [] < [0x01] < [0x01, 0x7F] < [0x01, 0x80] < [0x02]. Values are treated as unsigned.

    The returned comparator is inconsistent with Object#equals(Object) (since arrays support only identity equality), but it is consistent with java.util.Arrays#equals(Byte[], Byte[]).

    See also

    Lexicographical order article at Wikipedia

  20. def max(array: UByte*): UByte

    Returns the greatest value present in array.

    Returns the greatest value present in array.

    array

    a nonempty array of UByte values

    returns

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

    Exceptions thrown

    IllegalArgumentException if array is empty

  21. def min(array: UByte*): UByte

    Returns the least value present in array.

    Returns the least value present in array.

    array

    a nonempty array of UByte values

    returns

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

    Exceptions thrown

    IllegalArgumentException if array is empty

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

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

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

    Definition Classes
    AnyRef
  25. def saturatedValueOf(value: Long): UByte

    Returns the UByte value that, when treated as unsigned, is nearest in value to value.

    Returns the UByte value that, when treated as unsigned, is nearest in value to value.

    value

    any long value

    returns

    (Byte) 255 if value >= 255, (Byte) 0 if value <= 0, and value cast to UByte otherwise

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

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

    Returns the unsigned UByte value represented by a string with the given radix.

    Returns the unsigned UByte value represented by a string with the given radix.

    string

    the string containing the unsigned UByte representation to be parsed.

    radix

    the radix to use while parsing string

    Exceptions thrown

    NullPointerException if s is null (in contrast to Byte#parseByte(String))

    NumberFormatException if the string does not contain a valid unsigned UByte with the given radix, or if radix is not between Character#MIN_RADIX and Character#MAX_RADIX.

  29. def valueOf(string: String): UByte

    Returns the unsigned UByte value represented by the given decimal string.

    Returns the unsigned UByte value represented by the given decimal string.

    Exceptions thrown

    NullPointerException if s is null (in contrast to Byte#parseByte(String))

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

  30. def valueOf(value: Long): UByte

    Returns the UByte value that, when treated as unsigned, is equal to value, if possible.

    Returns the UByte value that, when treated as unsigned, is equal to value, if possible.

    value

    a value between 0 and 255 inclusive

    returns

    the UByte value that, when treated as unsigned, equals value

    Exceptions thrown

    IllegalArgumentException if value is negative or greater than 255

  31. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped