added #hash
authorClaus Gittinger <cg@exept.de>
Sat, 19 Aug 2000 13:25:24 +0200
changeset 1812 c9054636e3ea
parent 1811 df4f5e5b3396
child 1813 c25b1a3476b2
added #hash
ListEntry.st
--- a/ListEntry.st	Thu Aug 17 18:17:31 2000 +0200
+++ b/ListEntry.st	Sat Aug 19 13:25:24 2000 +0200
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libwidg2' }"
+
 Object subclass:#ListEntry
 	instanceVariableNames:''
 	classVariableNames:''
@@ -122,13 +124,7 @@
     "behave like a string when comparing"
 
     self == aString ifTrue:[^ true].
-    self species == aString species ifTrue:[
-        ^ self asString = aString asString
-    ].
-
-    ^ self asString = aString
-
-    "Created: 8.2.1996 / 12:01:24 / cg"
+    ^ self asString = aString asString
 !
 
 at:index
@@ -149,6 +145,12 @@
     "Modified: / 30.10.1997 / 15:42:06 / cg"
 !
 
+hash
+    "return an integer useful for hashing"
+
+    ^ self asString hash
+!
+
 size
     "behave like a string when asked for the size"
 
@@ -171,5 +173,5 @@
 !ListEntry class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ListEntry.st,v 1.15 1998-03-12 13:42:22 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ListEntry.st,v 1.16 2000-08-19 11:25:24 cg Exp $'
 ! !