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 › required static keyword
Pages: 1 2 
required static keyword? (Read 1892 times)
Re: Vector searching
Reply #15 - Jan 8th, 2007, 7:35pm
 
bridell wrote on Jan 8th, 2007, 11:48am:
I tried st33d's code and he()


He.
Re: required static keyword?
Reply #16 - Jan 9th, 2007, 2:55pm
 
Does someone want to test Vector.contains()? I'm rewriting aStar and getting a slow result on that one too.

ah wait:

http://www.javapractices.com/Topic17.cjp

It seems the practice of equals() is to override it to provide a concise method of comparison that agrees with your definition of comparison. So Java is right to implement equals(). But if one is just comparing references by running through a list - it is far quicker to write a for loop that goes through the whole lot.

A better indexing system would be nice, but I wouldn't be using Vector if I wasn't anticipating a mess of objects.

I hope this clears a few things up.
Pages: 1 2