UndefinedObject.st
branchjv
changeset 25442 f909fb8f9b36
parent 23107 40173e082cbc
equal deleted inserted replaced
25441:16ffb469ab8c 25442:f909fb8f9b36
     1 "
     1 "
     2  COPYRIGHT (c) 1988 by Claus Gittinger
     2  COPYRIGHT (c) 1988 by Claus Gittinger
     3  COPYRIGHT (c) 2015 Jan Vrany
     3  COPYRIGHT (c) 2015 Jan Vrany
       
     4  COPYRIGHT (c) 2023 LabWare
     4 	      All Rights Reserved
     5 	      All Rights Reserved
     5 
     6 
     6  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
     7  only in accordance with the terms of that license and with the
     8  only in accordance with the terms of that license and with the
     8  inclusion of the above copyright notice.   This software may not
     9  inclusion of the above copyright notice.   This software may not
    25 
    26 
    26 copyright
    27 copyright
    27 "
    28 "
    28  COPYRIGHT (c) 1988 by Claus Gittinger
    29  COPYRIGHT (c) 1988 by Claus Gittinger
    29  COPYRIGHT (c) 2015 Jan Vrany
    30  COPYRIGHT (c) 2015 Jan Vrany
       
    31  COPYRIGHT (c) 2023 LabWare
    30 	      All Rights Reserved
    32 	      All Rights Reserved
    31 
    33 
    32  This software is furnished under a license and may be used
    34  This software is furnished under a license and may be used
    33  only in accordance with the terms of that license and with the
    35  only in accordance with the terms of that license and with the
    34  inclusion of the above copyright notice.   This software may not
    36  inclusion of the above copyright notice.   This software may not
   154 
   156 
   155     ^ self == UndefinedObject
   157     ^ self == UndefinedObject
   156 ! !
   158 ! !
   157 
   159 
   158 
   160 
       
   161 
   159 !UndefinedObject methodsFor:'Compatibility-Squeak'!
   162 !UndefinedObject methodsFor:'Compatibility-Squeak'!
   160 
   163 
   161 subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString category:cat
   164 subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString category:cat
   162     ^ self subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries: '' category:cat
   165     ^ self subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries: '' category:cat
   163 
   166 
   174 
   177 
   175 asNilIfEmpty
   178 asNilIfEmpty
   176     "I am nil, so answer nil"
   179     "I am nil, so answer nil"
   177 
   180 
   178     ^ self
   181     ^ self
       
   182 !
       
   183 
       
   184 doIfNotNil:aBlock
       
   185     "if I am a collection, then enumerate myself into aBlock.
       
   186      if I am nil, then do nothing.
       
   187      Return the receiver.
       
   188      Otherwise, evaluate aBlock with myself as argument. 
       
   189      Here, answer nil"
       
   190 
       
   191     ^ nil
       
   192 
       
   193     "Created: / 20-03-2018 / 15:37:11 / stefan"
       
   194     "Modified (comment): / 05-08-2018 / 11:26:32 / Claus Gittinger"
   179 !
   195 !
   180 
   196 
   181 literalArrayEncoding
   197 literalArrayEncoding
   182     "encode myself as an array literal, from which a copy of the receiver
   198     "encode myself as an array literal, from which a copy of the receiver
   183      can be reconstructed with #decodeAsLiteralArray."
   199      can be reconstructed with #decodeAsLiteralArray."
   306     "return the number of indexed instvars
   322     "return the number of indexed instvars
   307      defined here since size in Object ommits the nil-check"
   323      defined here since size in Object ommits the nil-check"
   308 
   324 
   309     ^ 0
   325     ^ 0
   310 ! !
   326 ! !
   311 
       
   312 
   327 
   313 !UndefinedObject methodsFor:'subclass creation'!
   328 !UndefinedObject methodsFor:'subclass creation'!
   314 
   329 
   315 nilSubclass:action
   330 nilSubclass:action
   316     "common helper for subclass creation.
   331     "common helper for subclass creation.
   749     ^ '$Header$'
   764     ^ '$Header$'
   750 !
   765 !
   751 
   766 
   752 version_CVS
   767 version_CVS
   753     ^ '$Header$'
   768     ^ '$Header$'
       
   769 !
       
   770 
       
   771 version_HG
       
   772 
       
   773     ^ '$Changeset: <not expanded> $'
   754 ! !
   774 ! !
   755 
   775 
   756 
   776 
   757 UndefinedObject initialize!
   777 UndefinedObject initialize!