Character.st
changeset 12 8e03bd717355
parent 10 4f1f9a91e406
child 37 d9a302eaa3ef
equal deleted inserted replaced
11:6bf3080856be 12:8e03bd717355
    34 do not change the instance layout. (also, its not easy to define
    34 do not change the instance layout. (also, its not easy to define
    35 subclasses of Character since the Compiler always creates Character
    35 subclasses of Character since the Compiler always creates Character
    36 instances for $x and, since equality check on the Character class is
    36 instances for $x and, since equality check on the Character class is
    37 wired into the system in many places.)
    37 wired into the system in many places.)
    38 
    38 
    39 $Header: /cvs/stx/stx/libbasic/Character.st,v 1.5 1993-11-08 02:29:37 claus Exp $
    39 $Header: /cvs/stx/stx/libbasic/Character.st,v 1.6 1993-12-11 00:44:49 claus Exp $
    40 
    40 
    41 '!
    41 '!
    42 
    42 
    43 !Character class methodsFor:'instance creation'!
    43 !Character class methodsFor:'instance creation'!
    44 
    44 
   191 
   191 
   192 !Character methodsFor:'copying'!
   192 !Character methodsFor:'copying'!
   193 
   193 
   194 shallowCopy
   194 shallowCopy
   195     "return a shallow copy of myself
   195     "return a shallow copy of myself
       
   196      reimplemented since characters are unique"
       
   197 
       
   198      ^ self
       
   199 !
       
   200 
       
   201 simpleDeepCopy
       
   202     "return a depp copy of myself
       
   203      reimplemented since characters are unique"
       
   204 
       
   205      ^ self
       
   206 !
       
   207 
       
   208 deepCopyUsing:aDictionary
       
   209     "return a depp copy of myself
   196      reimplemented since characters are unique"
   210      reimplemented since characters are unique"
   197 
   211 
   198      ^ self
   212      ^ self
   199 !
   213 !
   200 
   214 
   575     stream nextPut:(self asciiValue)
   589     stream nextPut:(self asciiValue)
   576 ! !
   590 ! !
   577 
   591 
   578 !Character methodsFor:'printing & storing'!
   592 !Character methodsFor:'printing & storing'!
   579 
   593 
       
   594 isLiteral
       
   595     "return true, if the receiver can be used as a literal"
       
   596 
       
   597     ^ true
       
   598 !
       
   599 
   580 printString
   600 printString
   581     "return a string to print me"
   601     "return a string to print me"
   582 
   602 
   583     ^ self asString
   603     ^ self asString
   584 !
   604 !