10-19-2008 06:40 AM
How to compare two vector item.
I need to check for similar filenames
if similar filename(dont want to be upload) .
if not similar filename (upload)
Thanks in advance ....
10-19-2008 08:30 AM
I just discovered the RIM Arrays class here,
you may be able to use something like this,
but I would try to find a way to do all the "real" searching and sorting in the Arrays class which presumably
is native code and doesn't have the Comparator stuff ( which of course is useful but as you can imagine
probalby hard for JVM to execute very quickly).
Obviously, with two sorted lists it is easy to find similar objects for closer comparison. In this case, it may be faster
to sort string hashes or millisecond dates rather than object pointers given possible overhead of the comparator
but it would depend on a lot of things too. Oddly enough, RIM even provides a "parallel" argument in Arrays.sort()
to facilitate this [ I was looking for something like a "sort order" array to index an unrelated object array but this works fine too, sometimes even the vendors get something right ]
Anyway, this would seem to be a good package to think about if you need a small database like system too.