-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Out of curiosity, why would the ContentValues#valueSet be better than
> the HashMap#entrySet [2]? For my purposes, I don't really see that
> much of a functional difference.
I never said that ContentValues#valueSet was better than
HashMap#entrySet. I said that instead of iterating over a set returned
by HashMap#keySet and then getting the value with HashMap#get, you can
directly interate over a set of Map.Entry (with HashMap#entrySet).
for (String name : myFields.keySet()) {
String myKey = name;
String myVal = myFields.get(name);
}
would look like:
for (Entry<String, String> entry : myFields.entrySet()) {
String myKey = entry.getKey();
String myVal = entry.getValue();
}
Moreover, ContentValues has a similar method called valueSet. That's it ;)
Regards,
Cyril
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklSCjwACgkQlYy8cEwUMaQFRACfWxMuaViqdyvW72VNKSGinPC+
CqwAniDWzQzZK15V1gpHSJmphD3ZgSYE
=tmXp
-----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---