Boolean.st
changeset 25029 c16078bae17f
parent 18915 ec56299ed41f
child 25337 a072fff084de
equal deleted inserted replaced
25028:4ed2d89bf2a4 25029:c16078bae17f
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1988 by Claus Gittinger
     4  COPYRIGHT (c) 1988 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
    90      Boolean readFromString:'true xxx'   
    92      Boolean readFromString:'true xxx'   
    91      Boolean readFromString:'false xxx'  
    93      Boolean readFromString:'false xxx'  
    92     "
    94     "
    93 ! !
    95 ! !
    94 
    96 
    95 
       
    96 
       
    97 
       
    98 !Boolean class methodsFor:'queries'!
    97 !Boolean class methodsFor:'queries'!
    99 
    98 
   100 hasSharedInstances
    99 hasSharedInstances
   101     "return true if this class has shared instances, that is, instances
   100     "return true if this class can share instances when stored binary, 
   102      with the same value are identical.
   101      that is, instances with the same value can be stored by reference.
   103      True returned here - there is only one true and only one false."
   102      True returned here - there is only one true and only one false."
   104 
   103 
   105     ^ true
   104     ^ true
   106 !
   105 !
   107 
   106 
   117 
   116 
   118     "Modified: 23.4.1996 / 15:58:22 / cg"
   117     "Modified: 23.4.1996 / 15:58:22 / cg"
   119 ! !
   118 ! !
   120 
   119 
   121 
   120 
   122 
       
   123 
       
   124 !Boolean methodsFor:'blocked'!
   121 !Boolean methodsFor:'blocked'!
   125 
   122 
   126 addDependent:someOne
   123 addDependent:someOne
   127     "/ not really an error ...
   124     "/ not really an error ...
   128     "/ self error:'should not be invoked for booleans'
   125     "/ self error:'should not be invoked for booleans'
   202      receiver can be reconstructed using readFrom:."
   199      receiver can be reconstructed using readFrom:."
   203 
   200 
   204     ^ self printString
   201     ^ self printString
   205 ! !
   202 ! !
   206 
   203 
   207 
       
   208 !Boolean methodsFor:'testing'!
   204 !Boolean methodsFor:'testing'!
   209 
   205 
   210 isBoolean
   206 isBoolean
   211     "Return true, because it is a boolean."
   207     "Return true, because it is a boolean."
   212 
   208 
   238     "dispatch for visitor pattern; send #visitBoolean:with: to aVisitor"
   234     "dispatch for visitor pattern; send #visitBoolean:with: to aVisitor"
   239 
   235 
   240     ^ aVisitor visitBoolean:self with:aParameter
   236     ^ aVisitor visitBoolean:self with:aParameter
   241 ! !
   237 ! !
   242 
   238 
   243 
       
   244 !Boolean class methodsFor:'documentation'!
   239 !Boolean class methodsFor:'documentation'!
   245 
   240 
   246 version
   241 version
   247     ^ '$Header$'
   242     ^ '$Header$'
   248 !
   243 !