--- a/UndefinedObject.st Thu Dec 07 20:39:17 1995 +0100
+++ b/UndefinedObject.st Thu Dec 07 20:42:47 1995 +0100
@@ -11,10 +11,10 @@
"
Object subclass:#UndefinedObject
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'Kernel-Objects'
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Kernel-Objects'
!
!UndefinedObject class methodsFor:'documentation'!
@@ -33,10 +33,6 @@
"
!
-version
- ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.18 1995-11-11 15:28:05 cg Exp $'
-!
-
documentation
"
there is only one instance of this class: nil, representing an undefined
@@ -75,6 +71,43 @@
^ false
! !
+!UndefinedObject methodsFor:'copying'!
+
+copy
+ "return a shallow copy of myself
+ - since there is only one nil in the system return self"
+
+ ^ self
+!
+
+deepCopy
+ "return a deep copy of myself
+ - since there is only one nil in the system return self"
+
+ ^ self
+!
+
+deepCopyUsing:aDictionary
+ "return a deep copy of myself
+ - since there is only one nil in the system return self"
+
+ ^ self
+!
+
+shallowCopy
+ "return a shallow copy of myself
+ - since there is only one nil in the system return self"
+
+ ^ self
+!
+
+simpleDeepCopy
+ "return a deep copy of myself
+ - since there is only one nil in the system return self"
+
+ ^ self
+! !
+
!UndefinedObject methodsFor:'error catching'!
basicAt:index
@@ -91,104 +124,8 @@
^ self notIndexed
! !
-!UndefinedObject methodsFor:'testing'!
-
-isNil
- "return true if I am nil - since I am, return true"
-
- ^ true
-!
-
-notNil
- "return true if I am not nil - since I am nil, return false"
-
- ^ false
-!
-
-size
- "return the number of indexed instvars
- defined here since size in Object ommits the nil-check"
-
- ^ 0
-!
-
-basicSize
- "return the number of indexed instvars
- defined here since size in Object ommits the nil-check"
-
- ^ 0
-!
-
-hash
- "return an integer useful as a hash key"
-
- ^ 0
-!
-
-identityHash
- "return an integer useful as a hash key"
-
- ^ 0
-!
-
-isLiteral
- "return true, if the receiver can be used as a literal
- (i.e. can be used in constant arrays)"
-
- ^ true
-! !
-
-!UndefinedObject methodsFor:'copying'!
-
-copy
- "return a shallow copy of myself
- - since there is only one nil in the system return self"
-
- ^ self
-!
-
-shallowCopy
- "return a shallow copy of myself
- - since there is only one nil in the system return self"
-
- ^ self
-!
-
-deepCopy
- "return a deep copy of myself
- - since there is only one nil in the system return self"
-
- ^ self
-!
-
-simpleDeepCopy
- "return a deep copy of myself
- - since there is only one nil in the system return self"
-
- ^ self
-!
-
-deepCopyUsing:aDictionary
- "return a deep copy of myself
- - since there is only one nil in the system return self"
-
- ^ self
-! !
-
!UndefinedObject methodsFor:'printing & storing'!
-printString
- "return a string for printing myself"
-
- ^ 'nil'
-!
-
-storeString
- "return a string for storing myself"
-
- ^ 'nil'
-!
-
printOn:aStream
"append a printed representation of the receiver to the
argument, aStream"
@@ -196,11 +133,23 @@
aStream nextPutAll:'nil'
!
+printString
+ "return a string for printing myself"
+
+ ^ 'nil'
+!
+
storeOn:aStream
"append a printed representation of the receiver to the
argument, aStream, which allows reconstruction of it"
^ self printOn:aStream
+!
+
+storeString
+ "return a string for storing myself"
+
+ ^ 'nil'
! !
!UndefinedObject methodsFor:'subclass creation'!
@@ -264,18 +213,71 @@
- i.e. traps into doesNotUnderstand: for all of its messages."
^ self nilSubclass:(thisContext selector) args:(thisContext args)
-!
+!
+
+variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat
+ "create a new class which has nil as superclass
+ - i.e. traps into doesNotUnderstand: for all of its messages."
+
+ ^ self nilSubclass:(thisContext selector) args:(thisContext args)
+!
variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat
"create a new class which has nil as superclass
- i.e. traps into doesNotUnderstand: for all of its messages."
^ self nilSubclass:(thisContext selector) args:(thisContext args)
-!
+! !
+
+!UndefinedObject methodsFor:'testing'!
+
+basicSize
+ "return the number of indexed instvars
+ defined here since size in Object ommits the nil-check"
+
+ ^ 0
+!
+
+hash
+ "return an integer useful as a hash key"
+
+ ^ 0
+!
+
+identityHash
+ "return an integer useful as a hash key"
+
+ ^ 0
+!
+
+isLiteral
+ "return true, if the receiver can be used as a literal
+ (i.e. can be used in constant arrays)"
-variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat
- "create a new class which has nil as superclass
- - i.e. traps into doesNotUnderstand: for all of its messages."
+ ^ true
+!
+
+isNil
+ "return true if I am nil - since I am, return true"
+
+ ^ true
+!
+
+notNil
+ "return true if I am not nil - since I am nil, return false"
- ^ self nilSubclass:(thisContext selector) args:(thisContext args)
+ ^ false
+!
+
+size
+ "return the number of indexed instvars
+ defined here since size in Object ommits the nil-check"
+
+ ^ 0
! !
+
+!UndefinedObject class methodsFor:'documentation'!
+
+version
+ ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.19 1995-12-07 19:40:59 cg Exp $'
+! !