Interval.st
changeset 6745 c2c52940ec99
parent 6712 cd031a65139a
child 6747 6f749de322b2
--- a/Interval.st	Fri Sep 06 21:23:03 2002 +0200
+++ b/Interval.st	Tue Sep 10 13:49:58 2002 +0200
@@ -165,6 +165,21 @@
     stop := aNumber
 ! !
 
+!Interval methodsFor:'comparing'!
+
+= anInterval
+    anInterval class == self class ifTrue:[
+        ^ start = anInterval start
+        and:[ stop = anInterval stop
+        and:[ step = anInterval step]]
+    ].
+    ^ super = anInterval
+!
+
+hash
+    ^ ((((step hash bitShift:5) + start hash) bitShift:5) + stop hash) bitAnd:16r3FFFFFFF.
+! !
+
 !Interval methodsFor:'converting'!
 
 fromLiteralArrayEncoding:encoding
@@ -463,5 +478,5 @@
 !Interval class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.33 2002-08-07 22:46:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Interval.st,v 1.34 2002-09-10 11:49:58 cg Exp $'
 ! !