--- a/UUID.st Wed Oct 09 09:53:15 2013 +0200
+++ b/UUID.st Wed Oct 09 10:01:45 2013 +0200
@@ -428,6 +428,9 @@
node
"answer the node (ethernet) address of this uuid"
+ self isTimestampUUID ifFalse:[
+ ConversionError raiseWith:self errorString:' - trying to get node address from random UUID'.
+ ].
^ (ByteArray new:6) replaceFrom:1 to:6 with:self startingAt:11.
"
@@ -875,8 +878,20 @@
!UUID methodsFor:'testing'!
+isRandomUUID
+ ^ self version == 4
+
+ "
+ self genRandomUUID isRandomUUID
+ "
+!
+
isTimestampUUID
^ self version == 1
+
+ "
+ self genTimestampUUID isTimestampUUID
+ "
!
isUUID
@@ -886,11 +901,11 @@
!UUID class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/UUID.st,v 1.46 2013-10-09 07:53:15 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/UUID.st,v 1.47 2013-10-09 08:01:45 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic2/UUID.st,v 1.46 2013-10-09 07:53:15 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/UUID.st,v 1.47 2013-10-09 08:01:45 stefan Exp $'
! !