2015-10-08 14:26:04 +00:00
|
|
|
#class(#pointer) Array(Collection)
|
|
|
|
{
|
|
|
|
#method size
|
|
|
|
{
|
|
|
|
^self basicSize.
|
|
|
|
}
|
|
|
|
|
2016-03-16 14:05:34 +00:00
|
|
|
#method ubound
|
|
|
|
{
|
|
|
|
^(self basicSize - 1).
|
|
|
|
}
|
|
|
|
|
2015-10-08 14:26:04 +00:00
|
|
|
#method at: anInteger
|
|
|
|
{
|
|
|
|
^self basicAt: anInteger.
|
|
|
|
}
|
|
|
|
|
|
|
|
#method at: anInteger put: aValue
|
|
|
|
{
|
|
|
|
^self basicAt: anInteger put: aValue.
|
|
|
|
}
|
|
|
|
|
|
|
|
#method first
|
|
|
|
{
|
2016-03-16 14:05:34 +00:00
|
|
|
^self at: 0.
|
2015-10-08 14:26:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#method last
|
|
|
|
{
|
2016-03-16 14:05:34 +00:00
|
|
|
^self at: (self ubound).
|
2015-10-08 14:26:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#method do: aBlock
|
|
|
|
{
|
2016-03-16 14:05:34 +00:00
|
|
|
0 to: (self ubound) do: [:i | aBlock value: (self at: i)].
|
2015-10-08 14:26:04 +00:00
|
|
|
}
|
2016-03-16 02:27:18 +00:00
|
|
|
|
|
|
|
#method copy: anArray
|
|
|
|
{
|
2016-03-16 14:05:34 +00:00
|
|
|
0 to: (anArray ubound) do: [:i | self at: i put: (anArray at: i) ].
|
2016-03-16 02:27:18 +00:00
|
|
|
}
|
2015-10-08 14:26:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#class(#character) String(Array)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#class(#character) Symbol(Array)
|
|
|
|
{
|
|
|
|
}
|