<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Google Collections</title>
	<atom:link href="http://blog.jayway.com/2009/10/22/google-collections/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com/2009/10/22/google-collections/</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Sun, 12 Feb 2012 05:23:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Rama</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-78379</link>
		<dc:creator>Rama</dc:creator>
		<pubDate>Wed, 22 Jun 2011 17:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-78379</guid>
		<description>Thank you very much for a nice article..</description>
		<content:encoded><![CDATA[<p>Thank you very much for a nice article..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Whose Phone Number Is This</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-78213</link>
		<dc:creator>Whose Phone Number Is This</dc:creator>
		<pubDate>Fri, 06 May 2011 10:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-78213</guid>
		<description>I am happy that I learn something new.
Awesome way of expressing your ideas. You are my favourite.</description>
		<content:encoded><![CDATA[<p>I am happy that I learn something new.<br />
Awesome way of expressing your ideas. You are my favourite.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asics</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-77073</link>
		<dc:creator>asics</dc:creator>
		<pubDate>Fri, 25 Feb 2011 08:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-77073</guid>
		<description>Thanks you very much for your post.
It is a very clear introduction to the API.
It helped me to understand the basic concepts.</description>
		<content:encoded><![CDATA[<p>Thanks you very much for your post.<br />
It is a very clear introduction to the API.<br />
It helped me to understand the basic concepts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 传奇私服</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-74569</link>
		<dc:creator>传奇私服</dc:creator>
		<pubDate>Wed, 29 Dec 2010 09:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-74569</guid>
		<description>I like this concept. I visited your blog for the first time and just been your fan. Keep posting as I am gonna come to read it everyday</description>
		<content:encoded><![CDATA[<p>I like this concept. I visited your blog for the first time and just been your fan. Keep posting as I am gonna come to read it everyday</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph&#8217;s Blog &#187; Blog Archive &#187; Google Guava Teil 3: Objects/StringUtils/Primitives</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-41605</link>
		<dc:creator>Ralph&#8217;s Blog &#187; Blog Archive &#187; Google Guava Teil 3: Objects/StringUtils/Primitives</dc:creator>
		<pubDate>Sun, 06 Jun 2010 18:03:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-41605</guid>
		<description>[...] Google Collections Introduction to Google Collections [...]</description>
		<content:encoded><![CDATA[<p>[...] Google Collections Introduction to Google Collections [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hiram</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-39440</link>
		<dc:creator>Hiram</dc:creator>
		<pubDate>Wed, 19 May 2010 09:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-39440</guid>
		<description>Thanks you very much for your post.
It is a very clear introduction to the API.
It helped me to understand the basic concepts.</description>
		<content:encoded><![CDATA[<p>Thanks you very much for your post.<br />
It is a very clear introduction to the API.<br />
It helped me to understand the basic concepts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Generic Method For Sorting (Google Collections) Multiset Per Entry Count &#171; Java. Internet. Algorithms. Ideas.</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-26289</link>
		<dc:creator>A Generic Method For Sorting (Google Collections) Multiset Per Entry Count &#171; Java. Internet. Algorithms. Ideas.</dc:creator>
		<pubDate>Sat, 20 Feb 2010 17:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-26289</guid>
		<description>[...] used google collections, in addition to the official website, you might find those tutorials (1 and 2)  useful for an [...]</description>
		<content:encoded><![CDATA[<p>[...] used google collections, in addition to the official website, you might find those tutorials (1 and 2)  useful for an [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-25333</link>
		<dc:creator>Deepak</dc:creator>
		<pubDate>Tue, 16 Feb 2010 15:55:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-25333</guid>
		<description>Good stuff, I tried to explore basic aspects in this article - http://www.myhomepageindia.com/index.php/2010/01/07/google-collection-types.html</description>
		<content:encoded><![CDATA[<p>Good stuff, I tried to explore basic aspects in this article &#8211; <a href="http://www.myhomepageindia.com/index.php/2010/01/07/google-collection-types.html" rel="nofollow">http://www.myhomepageindia.com/index.php/2010/01/07/google-collection-types.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger Schildmeijer</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14422</link>
		<dc:creator>Roger Schildmeijer</dc:creator>
		<pubDate>Tue, 27 Oct 2009 20:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14422</guid>
		<description>http://code.google.com/p/guava-libraries/</description>
		<content:encoded><![CDATA[<p><a href="http://code.google.com/p/guava-libraries/" rel="nofollow">http://code.google.com/p/guava-libraries/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sune Simonsen</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14312</link>
		<dc:creator>Sune Simonsen</dc:creator>
		<pubDate>Mon, 26 Oct 2009 09:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14312</guid>
		<description>Thanks to all of you, I&#039;m really happy you liked the article.

To you Phil, I can&#039;t come up with a better way than to sort by occurrences as you mentioned:

Function&lt;Multiset.Entry&lt;Fruit&gt;, Integer&gt; getCountFunction =
&#160;&#160;&#160;&#160;new Function&lt;Multiset.Entry&lt;Fruit&gt;, Integer&gt;() {
&#160;&#160;&#160;&#160;&#160;&#160;public Integer apply(Multiset.Entry&lt;Fruit&gt; from) {
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;return from.getCount();
&#160;&#160;&#160;&#160;&#160;&#160;}
&#160;&#160;&#160;&#160;};

Ordering&lt;Multiset.Entry&lt;Fruit&gt;&gt; popular =
&#160;&#160;&#160;&#160;Ordering.natural().reverse().onResultOf(getCountFunction);

List&lt;Multiset.Entry&lt;Fruit&gt;&gt; sorted =
&#160;&#160;&#160;&#160;popular.sortedCopy(fruits.entrySet());

for (Multiset.Entry&lt;Fruit&gt; entry : sorted) {
&#160;&#160;System.out.println(String.format(&quot;%s %s&quot;, entry.getCount(),
&#160;&#160;&#160;&#160;entry.getElement()));
}

4: Yellow Banana
3: Red Strawberry
2: Green Kiwifruit
2: Red Tomato
1: Yellow Lemon</description>
		<content:encoded><![CDATA[<p>Thanks to all of you, I&#8217;m really happy you liked the article.</p>
<p>To you Phil, I can&#8217;t come up with a better way than to sort by occurrences as you mentioned:</p>
<p>Function&lt;Multiset.Entry&lt;Fruit&gt;, Integer&gt; getCountFunction =<br />
&nbsp;&nbsp;&nbsp;&nbsp;new Function&lt;Multiset.Entry&lt;Fruit&gt;, Integer&gt;() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public Integer apply(Multiset.Entry&lt;Fruit&gt; from) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return from.getCount();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;};</p>
<p>Ordering&lt;Multiset.Entry&lt;Fruit&gt;&gt; popular =<br />
&nbsp;&nbsp;&nbsp;&nbsp;Ordering.natural().reverse().onResultOf(getCountFunction);</p>
<p>List&lt;Multiset.Entry&lt;Fruit&gt;&gt; sorted =<br />
&nbsp;&nbsp;&nbsp;&nbsp;popular.sortedCopy(fruits.entrySet());</p>
<p>for (Multiset.Entry&lt;Fruit&gt; entry : sorted) {<br />
&nbsp;&nbsp;System.out.println(String.format(&#8220;%s %s&#8221;, entry.getCount(),<br />
&nbsp;&nbsp;&nbsp;&nbsp;entry.getElement()));<br />
}</p>
<p>4: Yellow Banana<br />
3: Red Strawberry<br />
2: Green Kiwifruit<br />
2: Red Tomato<br />
1: Yellow Lemon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14291</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Sun, 25 Oct 2009 21:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14291</guid>
		<description>As you guessed, I meant &quot;multiset&quot; and not multimap in my example.
Thanks.</description>
		<content:encoded><![CDATA[<p>As you guessed, I meant &#8220;multiset&#8221; and not multimap in my example.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14290</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Sun, 25 Oct 2009 21:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14290</guid>
		<description>Excellent post!
I have a question. Do you know a way to sort a multiset based on the number of occurrence of each elements? 
For instance if your multimap is
apple -&gt; 1
tomato -&gt;5
you would like to see tomato first.
I can&#039;t find an easy way to do that operation that seems to me very usefull.
In the meantime I used a comparator as follow

Comparator&lt;Multiset.Entry&gt; occurence_comparator = new Comparator&lt;Multiset.Entry&gt;() {
			public int compare(Multiset.Entry e1, Multiset.Entry e2) {
				return e2.getCount() - e1.getCount() ;
			}
		};
		
Is there a more generic and elegant way to do it?
Thanks!
-Phil.</description>
		<content:encoded><![CDATA[<p>Excellent post!<br />
I have a question. Do you know a way to sort a multiset based on the number of occurrence of each elements?<br />
For instance if your multimap is<br />
apple -&gt; 1<br />
tomato -&gt;5<br />
you would like to see tomato first.<br />
I can&#8217;t find an easy way to do that operation that seems to me very usefull.<br />
In the meantime I used a comparator as follow</p>
<p>Comparator&lt;Multiset.Entry&gt; occurence_comparator = new Comparator&lt;Multiset.Entry&gt;() {<br />
			public int compare(Multiset.Entry e1, Multiset.Entry e2) {<br />
				return e2.getCount() &#8211; e1.getCount() ;<br />
			}<br />
		};</p>
<p>Is there a more generic and elegant way to do it?<br />
Thanks!<br />
-Phil.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sachin Misurkar</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14216</link>
		<dc:creator>sachin Misurkar</dc:creator>
		<pubDate>Sat, 24 Oct 2009 15:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14216</guid>
		<description>Thanks for sharing such new and useful info.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing such new and useful info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshu Mishra</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14178</link>
		<dc:creator>Anshu Mishra</dc:creator>
		<pubDate>Fri, 23 Oct 2009 20:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14178</guid>
		<description>Thanks for the post. I was planning to explore it since the first time I saw it presented by Bob Lee and Josh Bloch. Good work !

Nice introduction.</description>
		<content:encoded><![CDATA[<p>Thanks for the post. I was planning to explore it since the first time I saw it presented by Bob Lee and Josh Bloch. Good work !</p>
<p>Nice introduction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Winterberg</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14158</link>
		<dc:creator>Benjamin Winterberg</dc:creator>
		<pubDate>Fri, 23 Oct 2009 08:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14158</guid>
		<description>This is a nice addition to this introduction to google collections:
http://bwinterberg.blogspot.com/2009/09/introduction-to-google-collections.html</description>
		<content:encoded><![CDATA[<p>This is a nice addition to this introduction to google collections:<br />
<a href="http://bwinterberg.blogspot.com/2009/09/introduction-to-google-collections.html" rel="nofollow">http://bwinterberg.blogspot.com/2009/09/introduction-to-google-collections.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krzysztof Białek</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14157</link>
		<dc:creator>Krzysztof Białek</dc:creator>
		<pubDate>Fri, 23 Oct 2009 08:36:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14157</guid>
		<description>Very nice introduction. It seems to be inspired by Scala collections a lot. It&#039;s a pity that functions definitions need so much boilerplate in Java. Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Very nice introduction. It seems to be inspired by Scala collections a lot. It&#8217;s a pity that functions definitions need so much boilerplate in Java. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sheff</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14155</link>
		<dc:creator>sheff</dc:creator>
		<pubDate>Fri, 23 Oct 2009 07:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14155</guid>
		<description>I will not use Java standard collections API.
From this moment only Google Collections.
Thank you for nice introduction article.</description>
		<content:encoded><![CDATA[<p>I will not use Java standard collections API.<br />
From this moment only Google Collections.<br />
Thank you for nice introduction article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sune Simonsen</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14152</link>
		<dc:creator>Sune Simonsen</dc:creator>
		<pubDate>Fri, 23 Oct 2009 07:24:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14152</guid>
		<description>Thank you Gautam.</description>
		<content:encoded><![CDATA[<p>Thank you Gautam.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gautam</title>
		<link>http://blog.jayway.com/2009/10/22/google-collections/comment-page-1/#comment-14138</link>
		<dc:creator>Gautam</dc:creator>
		<pubDate>Thu, 22 Oct 2009 20:18:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=2052#comment-14138</guid>
		<description>This is an excellent post.

Thanks,
--Gautam</description>
		<content:encoded><![CDATA[<p>This is an excellent post.</p>
<p>Thanks,<br />
&#8211;Gautam</p>
]]></content:encoded>
	</item>
</channel>
</rss>

