If I am a subclass of an array, how do I access an element?
class ArrayOfFoo extends Array
{
public function getFooAt(anIndex : int) : Foo
{
return this[anIndex] as Foo;
}
}
I could wrap the array instead of a subclass, but without the generic IArray interface, which is less useful for standard and user functions that expect an array.
Vectors do not allow subclasses at all, so they will not help.
thank
source
share