gsm: Use variables of the class and not classVariables
This commit is contained in:
parent
7319b034c8
commit
6a12deef01
33
GSM48.st
33
GSM48.st
|
@ -1514,8 +1514,9 @@ Object subclass: GSMNumberDigits [
|
|||
<category: 'OsmoGSM'>
|
||||
<comment: 'I represent table 10.5.118 continued'>
|
||||
|
||||
DigitMap := nil.
|
||||
ReverseMap := nil.
|
||||
GSMNumberDigits class [
|
||||
| digitMap reverseMap |
|
||||
]
|
||||
|
||||
GSMNumberDigits class >> mapDigit: aBinary [
|
||||
^ self digitMap at: aBinary asInteger + 1.
|
||||
|
@ -1526,30 +1527,30 @@ Object subclass: GSMNumberDigits [
|
|||
]
|
||||
|
||||
GSMNumberDigits class >> digitMap [
|
||||
^ DigitMap ifNil: [
|
||||
DigitMap := Dictionary new.
|
||||
^ digitMap ifNil: [
|
||||
digitMap := Dictionary new.
|
||||
1 to: 10 do: [:each |
|
||||
DigitMap at: each put: (each + 48 - 1) asCharacter.
|
||||
digitMap at: each put: (each + 48 - 1) asCharacter.
|
||||
].
|
||||
|
||||
DigitMap at: 11 put: $*.
|
||||
DigitMap at: 12 put: $#.
|
||||
DigitMap at: 13 put: $a.
|
||||
DigitMap at: 14 put: $b.
|
||||
DigitMap at: 15 put: $c.
|
||||
DigitMap at: 16 put: Character eof.
|
||||
DigitMap yourself.
|
||||
digitMap at: 11 put: $*.
|
||||
digitMap at: 12 put: $#.
|
||||
digitMap at: 13 put: $a.
|
||||
digitMap at: 14 put: $b.
|
||||
digitMap at: 15 put: $c.
|
||||
digitMap at: 16 put: Character eof.
|
||||
digitMap yourself.
|
||||
].
|
||||
]
|
||||
|
||||
GSMNumberDigits class >> reverseMap [
|
||||
^ ReverseMap ifNil: [
|
||||
ReverseMap := Dictionary new.
|
||||
^ reverseMap ifNil: [
|
||||
reverseMap := Dictionary new.
|
||||
self digitMap associationsDo: [:each |
|
||||
ReverseMap at: each value put: (each key - 1).
|
||||
reverseMap at: each value put: (each key - 1).
|
||||
].
|
||||
|
||||
ReverseMap yourself.
|
||||
reverseMap yourself.
|
||||
].
|
||||
]
|
||||
|
||||
|
|
Reference in New Issue