comment and category change only
authorClaus Gittinger <cg@exept.de>
Sun, 02 Feb 2003 17:41:18 +0100
changeset 6991 e95313d7c780
parent 6990 a6bda971619f
child 6992 8ed0883dff8f
comment and category change only
Set.st
--- a/Set.st	Sat Feb 01 16:11:56 2003 +0100
+++ b/Set.st	Sun Feb 02 17:41:18 2003 +0100
@@ -190,6 +190,26 @@
     "Created: / 24.10.1997 / 23:13:44 / cg"
 ! !
 
+!Set methodsFor:'ST80 compatibility'!
+
+initialIndexFor:hashKey boundedBy:length
+    "for ST-80 compatibility only; it is (currently) not used in this
+     implementation of sets. Therefore, in ST/X it does not make sense
+     to redefine it. (which may be a bad design decision, but slightly
+     improves performance, by avoiding an extra message send ...)"
+
+    |index "{ Class:SmallInteger }"|
+
+    index := hashKey bitAnd:16r3FFFFFFF.
+    index < 16r1FFFFFFF ifTrue:[
+        index := index * 2
+    ].
+    index := index \\ length + 1.
+    ^ index.
+
+    "Modified: 1.3.1997 / 01:01:13 / cg"
+! !
+
 !Set methodsFor:'accessing'!
 
 at:index
@@ -710,31 +730,14 @@
 !
 
 hashFor:aKey
-    "return an initial index given a key."
+    "return the arguments hash value.
+     Redefined in subclasses, which use a different comparison (i.e. identity compare)"
 
     ^ aKey hash
 
     "Created: 19.3.1997 / 15:03:03 / cg"
 !
 
-initialIndexFor:hashKey boundedBy:length
-    "for ST-80 compatibility only; it is (currently) not used in this
-     implementation of sets. Therefore, in ST/X it does not make sense
-     to redefine it. (which may be a bad design decision, but slightly
-     improves performance, by avoiding an extra message send ...)"
-
-    |index "{ Class:SmallInteger }"|
-
-    index := hashKey bitAnd:16r3FFFFFFF.
-    index < 16r1FFFFFFF ifTrue:[
-        index := index * 2
-    ].
-    index := index \\ length + 1.
-    ^ index.
-
-    "Modified: 1.3.1997 / 01:01:13 / cg"
-!
-
 initialIndexForKey:aKey
     "return an initial index given a key."
 
@@ -1121,7 +1124,7 @@
 !Set class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.79 2002-11-29 11:10:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.80 2003-02-02 16:41:18 cg Exp $'
 ! !
 
 Set initialize!