support/extensions.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 01 Feb 2012 08:54:33 +0000
changeset 105 ba761aff18ac
parent 93 cc18004ec5a5
child 109 9587e2df7029
permissions -rw-r--r--
Yet another instvar rename, hopefully last.

"{ Package: 'stx:goodies/xtreams/support' }"

!

!Behavior methodsFor:'xtreams'!

absoluteName

        ^self name
! !
!Block methodsFor:'xtreams'!

cull: value

    ^self numArgs = 1 ifTrue: [ self value: value ] ifFalse: [ self value ]
! !
!Block methodsFor:'xtreams'!

cull: value1 cull: value2

    ^self numArgs < 2 ifTrue: [ self cull: value1 ] ifFalse: [ self value: value1 value: value2 ]
! !
!Object methodsFor:'xtreams'!

isFixedArgument

    ^false
! !
!OrderedCollection methodsFor:'xtreams'!

copyGrownToAtLeast: newSize

    self grow: newSize
! !
!SequenceableCollection methodsFor:'xtreams'!

copyGrownToAtLeast: newSize

    |newCollection|

    newCollection := self class new: newSize.
    newCollection replaceFrom: 1 to: self size with: self startingAt: 1.
    ^newCollection
! !
!SequenceableCollection methodsFor:'xtreams'!

recycle

    Xtreams::RecyclingCenter recycle: self
! !
!Symbol methodsFor:'xtreams'!

cull: anObject

    ^anObject perform: self
! !
!SequenceableCollection class methodsFor:'xtreams'!

newRecycled: size

    ^Xtreams::RecyclingCenter new: size class: self
! !