Angry?

On Jan 12, 2010 12:32 a.m., "Philip" <[email protected]> wrote:

Thanks for your reply. Complaint is a strong word... I am merely
pointing it out ;-)

contains() works only to find out if the element is in the set or not
(it returns a bool.)
find would give me an iterator that I can use to get to the object
directly.

workaround that's using contains() to speed up the discovery of the
element in the set for now:

   public int numberOfNodes(Target target) {
       if (targets.contains(target)) {
           for (HashElement element: targets) {
            if (element.target == target)
                   return element.nodes != null ? element.nodes.size
() : 0;
           }
       } else
          return 0;
   }

Knowing that targets can only have unique targets, and because I am
reluctant to modify drastically from one platform to another, I am
using a HashSet with the current limitation I discovered in the
Android impl.

Thanks,

Philip

On Jan 11, 3:15 pm, Mark Murphy <[email protected]> wrote: > Mark
Murphy wrote: > > Philip wr...

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]<android-developers%[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to