sealed class Guid[+A] extends Ordered[Guid[_]] with Serializable
Tries to be a space/cpu efficient and type safe replacement for java's UUID.
This class takes a single (although unused) type parameter. This is to implemnet compile-time checks while still keeping the json integration simple (only need to define (de)serialization in one place)
E.g.
val orderGuid: Guid[Order] = ... val userGuid: Guid[User] = ...
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- Guid
- Serializable
- Serializable
- Ordered
- Comparable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
<(that: Guid[_]): Boolean
- Definition Classes
- Ordered
-
def
<=(that: Guid[_]): Boolean
- Definition Classes
- Ordered
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
>(that: Guid[_]): Boolean
- Definition Classes
- Ordered
-
def
>=(that: Guid[_]): Boolean
- Definition Classes
- Ordered
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
compare(other: Guid[_]): Int
- Definition Classes
- Guid → Ordered
-
def
compareTo(that: Guid[_]): Int
- Definition Classes
- Ordered → Comparable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
equals(obj: Any): Boolean
- Definition Classes
- Guid → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- def getLeastSignificantBits(): Long
- def getMostSignificantBits(): Long
-
final
val
hashCode: Int
- Definition Classes
- Guid → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val leastSignificantBits: Long
- val mostSignificantBits: Long
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- final def toBytes: Array[Byte]
-
final
def
toString(): String
Optimized version (should generate much less garbage than UUID).
Optimized version (should generate much less garbage than UUID).
- returns
should produce same result as UUID.
- Definition Classes
- Guid → AnyRef → Any
- final def toUUID: UUID
-
final
def
typeCast[B]: Guid[B]
Safe way to cast an Guid of marker type A to Guid of marker type B.
Safe way to cast an Guid of marker type A to Guid of marker type B.
This should only be used to convert between Guids with equivalent marker types (i.e. Guid[com.foo.User] -> Guid[org.bar.User]).
It should _not_ be used to convert between Guids with unrelated marker types, like User -> Order.
- B
The target marker type
- returns
a new Guid
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )