As you all know, Vector support type checking by added Type parameter.
var v:Vector.<String> = new Vector.<String>();
I wonder if I am able to cr开发者_StackOverflow中文版eate a custom class that have Type parameter, something like this
var myClassInstance: MyClassDefinition.<String>;
Thank you.
Harry.
ActionScript doesn’t (yet) support generics. Vector
is a special case with support hard-coded into the compiler.
See also: Why doesn't ActionScript have “generics”?
精彩评论