We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Is there a "Set" data structure
Page Index Toggle Pages: 1
Is there a "Set" data structure? (Read 341 times)
Is there a "Set" data structure?
Oct 25th, 2009, 6:46am
 
I'm having difficulty figuring out, since the word is so common, if there is any standard implementation for a "Set". You know, the math kind? An unordered collection without repetition? I don't see anything in the reference.. Is there a commonly used library with this object in it?
Re: Is there a "Set" data structure?
Reply #1 - Oct 25th, 2009, 7:12am
 
See Java's Set interface, implemented, among others, by the popular HashSet.
I link to Java 1.4 docs to avoid confusion with the generics not yet allowed in Processing.

Processing's reference doesn't, and cannot, reference all Java's doc (does it for some common stuff like Strings and ArrayList, though), so it is always a good idea to check Java ref.
Page Index Toggle Pages: 1