final class RichUUID extends AnyVal with Ordered[UUID]
Pimp-my-library pattern, wrapping the underlying java.util.UUID.
This class extends AnyVal, making all the extension methods have little-to-no runtime overhead.
The pimp is complete through an implicit conversion in the Imports trait or the uuid package object.
- Source
- RichUUID.scala
- Alphabetic
- By Inheritance
- RichUUID
- Ordered
- Comparable
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##(): Int
- Definition Classes
- Any
- def <(that: uuid.UUID): Boolean
- Definition Classes
- Ordered
- def <=(that: uuid.UUID): Boolean
- Definition Classes
- Ordered
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- def >(that: uuid.UUID): Boolean
- Definition Classes
- Ordered
- def >=(that: uuid.UUID): Boolean
- Definition Classes
- Ordered
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def byteArray: Array[Byte]
Encodes this
UUIDas aBytearray with 16 elements. - def charArray: Array[Char]
Encodes this
UUIDas aChararray with 36 elements inxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxformat. - def compare(that: uuid.UUID): Int
This comparison allows for sanity compatible unsigned ordering
This comparison allows for sanity compatible unsigned ordering
- Definition Classes
- RichUUID → Ordered
- def compareTo(that: uuid.UUID): Int
WARNING: JVM sorts UUIDs differently to the rest of the world (languages and databases).
WARNING: JVM sorts UUIDs differently to the rest of the world (languages and databases). This is due to default signed Long ordering and has been marked as a Will Not Fix due to legacy code: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=7025832
- Definition Classes
- RichUUID → Ordered → Comparable
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def intArray: Array[Int]
Encodes this
UUIDas anIntarray with 4 elements. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def leastSigBits: Long
Returns the least significant 64 bits of this
UUID.Returns the least significant 64 bits of this
UUID.- Annotations
- @inline()
- def longArray: Array[Long]
Encodes this
UUIDas aLongarray with 2 elements. - def mostSigBits: Long
Returns the most significant 64 bits of this
UUID.Returns the most significant 64 bits of this
UUID.- Annotations
- @inline()
- def shortArray: Array[Short]
Encodes this
UUIDas aShortarray with 8 elements. - def string: String
Returns this
UUIDas aStringinxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxformat.Returns this
UUIDas aStringinxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxformat. Hexadecimal characters will be lower-cased. This method is an optimized drop in replacement for the legacytoStringmethod. - def toByteArray(buffer: Array[Byte], offset: Int): Unit
Writes this
UUIDto the providedBytearray.Writes this
UUIDto the providedBytearray.- Annotations
- @inline()
- def toCharArray(buffer: Array[Char], offset: Int): Unit
Writes this
UUIDto the providedChararray inxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxformat. - def toIntArray(buffer: Array[Int], offset: Int): Unit
Writes this
UUIDto the providedIntarray.Writes this
UUIDto the providedIntarray.- Annotations
- @inline()
- def toLongArray(buffer: Array[Long], offset: Int): Unit
Writes this
UUIDto the providedLongarray.Writes this
UUIDto the providedLongarray.- Annotations
- @inline()
- def toLowerCase: String
Alias for
stringwhich implicitly returns a lower-casedString.Alias for
stringwhich implicitly returns a lower-casedString.- Annotations
- @inline()
- def toShortArray(buffer: Array[Short], offset: Int): Unit
Writes this
UUIDto the providedShortarray.Writes this
UUIDto the providedShortarray.- Annotations
- @inline()
- def toString(): String
- Definition Classes
- Any
- def toUpperCase: String
Returns this
UUIDas aStringinxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxformat.Returns this
UUIDas aStringinxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxformat. Hexadecimal characters will be upper-cased.