开发者

How do I use hashset in actionscript

Right now I am using ArrayCollection. But I want to change that to Set as I want make sure do duplicate values come.

var addressList:ArrayCollection = new ArrayCollection();    

One way is I can use Dictio开发者_如何转开发nary and store addresses as a key. And I can just use keys to iterate. But I am looking for Java HashSet like implementation.


You want to download Polygonal Data Structures. The swc contains a HashSet. If you want Java-style template syntax for Flash, you should also check out Haxe.


The AS3 equivalent to HashMap or HashSet is the Dictionary class, and to a lesser extent, the Object class. Object keys are stored as strings, while with Dictionary the keys are objects. You can't have duplicate entries with either. Are you looking for a specific implementation other than that?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜