+ isEmptyOrNil
authorClaus Gittinger <cg@exept.de>
Tue, 13 Nov 2001 13:21:48 +0100
changeset 6181 5876cc789e41
parent 6180 f1f0dfee9372
child 6182 2b992cf865bc
+ isEmptyOrNil
Collection.st
Object.st
UndefinedObject.st
--- a/Collection.st	Tue Nov 13 10:17:26 2001 +0100
+++ b/Collection.st	Tue Nov 13 13:21:48 2001 +0100
@@ -13,11 +13,11 @@
 "{ Package: 'stx:libbasic' }"
 
 Object subclass:#Collection
-        instanceVariableNames:''
-        classVariableNames:'InvalidKeySignal EmptyCollectionSignal ValueNotFoundSignal
-                NotEnoughElementsSignal RecursiveCollectionStoreStringSignal'
-        poolDictionaries:''
-        category:'Collections-Abstract'
+	instanceVariableNames:''
+	classVariableNames:'InvalidKeySignal EmptyCollectionSignal ValueNotFoundSignal
+		NotEnoughElementsSignal RecursiveCollectionStoreStringSignal'
+	poolDictionaries:''
+	category:'Collections-Abstract'
 !
 
 !Collection class methodsFor:'documentation'!
@@ -2241,6 +2241,15 @@
     ^ self size == 0
 !
 
+isEmptyOrNil
+    "Squeak compatibility:
+     return true if I am nil or an empty collection - true here, iff the receivers size is 0"
+
+    ^ self isEmpty
+
+    "Created: / 13.11.2001 / 13:17:12 / cg"
+!
+
 isNilOrEmptyCollection
     "return true if I am nil or an empty collection - true here, iff the receivers size is 0"
 
@@ -2317,6 +2326,6 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.117 2001-11-05 15:46:17 james Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.118 2001-11-13 12:21:48 cg Exp $'
 ! !
 Collection initialize!
--- a/Object.st	Tue Nov 13 10:17:26 2001 +0100
+++ b/Object.st	Tue Nov 13 13:21:48 2001 +0100
@@ -7749,6 +7749,15 @@
     ^ false
 !
 
+isEmptyOrNil
+    "Squeak compatibility:
+     return true if I am nil or an empty collection - return false here"
+
+    ^ false
+
+    "Created: / 13.11.2001 / 13:17:04 / cg"
+!
+
 isExternalStream
     "return true, if the receiver is some kind of externalStream;
      false is returned here - the method is only redefined in ExternalStream."
@@ -8570,6 +8579,6 @@
 !Object class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.376 2001-11-10 14:20:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.377 2001-11-13 12:21:32 cg Exp $'
 ! !
 Object initialize!
--- a/UndefinedObject.st	Tue Nov 13 10:17:26 2001 +0100
+++ b/UndefinedObject.st	Tue Nov 13 13:21:48 2001 +0100
@@ -603,6 +603,15 @@
     ^ nilBlockOrValue value
 !
 
+isEmptyOrNil
+    "Squeak compatibility:
+     return true if I am nil or an empty collection - since I am nil, return true"
+
+    ^ true
+
+    "Created: / 13.11.2001 / 13:16:40 / cg"
+!
+
 isLiteral
     "return true, if the receiver can be used as a literal constant in ST syntax
      (i.e. can be used in constant arrays)"
@@ -647,6 +656,6 @@
 !UndefinedObject class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.51 2001-10-02 15:23:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.52 2001-11-13 12:21:14 cg Exp $'
 ! !
 UndefinedObject initialize!