70 lines
1.7 KiB
Smalltalk
70 lines
1.7 KiB
Smalltalk
Class {
|
|
#name : #GrafoscopioPillarASTextStringProjectionAdapter,
|
|
#superclass : #GrafoscopioPillarASTextStringAdapter,
|
|
#instVars : [
|
|
'from',
|
|
'to',
|
|
'cached'
|
|
],
|
|
#category : #'Grafoscopio-Pillar'
|
|
}
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> asText [
|
|
^ self string asText
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> at: anInteger [
|
|
^ self cached at: anInteger
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> cached [
|
|
^ cached ifNil: [ cached := text extractStringFrom: from to: to ]
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> copyFrom: one to: two [
|
|
^ self class new
|
|
text: text;
|
|
from: from + one;
|
|
to: from + two;
|
|
yourself
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> from: anInteger [
|
|
from := anInteger
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> isEmpty [
|
|
^ to <= from
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> printOn: aStream [
|
|
aStream
|
|
nextPutAll: 'SubStringAdapter(';
|
|
nextPutAll: from asString;
|
|
nextPutAll: ':';
|
|
nextPutAll: to asString;
|
|
nextPutAll: ')'
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> size [
|
|
^ to - from
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> string [
|
|
^ text extractStringFrom: from to: to
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringProjectionAdapter >> to: anInteger [
|
|
to := anInteger
|
|
]
|