<?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: The Filter Pattern: Java Conditional Abstraction With Iterables</title>
	<atom:link href="http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/feed/" rel="self" type="application/rss+xml" />
	<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/</link>
	<description>Thoughts and photos from an American living in Spain.</description>
	<lastBuildDate>Tue, 22 May 2012 18:38:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Arora Hitesh</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-8490</link>
		<dc:creator>Arora Hitesh</dc:creator>
		<pubDate>Mon, 25 Jul 2011 04:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-8490</guid>
		<description>Beautiful code.</description>
		<content:encoded><![CDATA[<p>Beautiful code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: x</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1787</link>
		<dc:creator>x</dc:creator>
		<pubDate>Thu, 15 Jul 2010 21:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1787</guid>
		<description>I agree with Hardware guy.  You didn&#039;t motivate this properly, Erik.

Replacing

if (meetsSomeCriteria(thing))

with

someCriteria.meets(thing)

does not help.

Passing functions around - fine, if that&#039;s what you need.  But your presentation here is completely misleading.</description>
		<content:encoded><![CDATA[<p>I agree with Hardware guy.  You didn&#8217;t motivate this properly, Erik.</p>
<p>Replacing</p>
<p>if (meetsSomeCriteria(thing))</p>
<p>with</p>
<p>someCriteria.meets(thing)</p>
<p>does not help.</p>
<p>Passing functions around &#8211; fine, if that&#8217;s what you need.  But your presentation here is completely misleading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Subhasish</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1786</link>
		<dc:creator>Subhasish</dc:creator>
		<pubDate>Sat, 03 Jul 2010 18:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1786</guid>
		<description>Excellent Code... I like it !</description>
		<content:encoded><![CDATA[<p>Excellent Code&#8230; I like it !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fluminis</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1785</link>
		<dc:creator>Fluminis</dc:creator>
		<pubDate>Thu, 04 Mar 2010 16:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1785</guid>
		<description>Yeaaah !, great job, thanks for sharing.

I change your class to filter a tree...
Not so easy but your work help me a lot, thanks again.</description>
		<content:encoded><![CDATA[<p>Yeaaah !, great job, thanks for sharing.</p>
<p>I change your class to filter a tree&#8230;<br />
Not so easy but your work help me a lot, thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik R.</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1784</link>
		<dc:creator>Erik R.</dc:creator>
		<pubDate>Sun, 04 Oct 2009 19:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1784</guid>
		<description>Yes, that call is valid.  The code I have here does compile, after fixing the one error that Phil pointed out above: The iterable parameter on line 11 must be marked final.

Once I fixed that, I just compiled the class fine.</description>
		<content:encoded><![CDATA[<p>Yes, that call is valid.  The code I have here does compile, after fixing the one error that Phil pointed out above: The iterable parameter on line 11 must be marked final.</p>
<p>Once I fixed that, I just compiled the class fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhijeet</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1783</link>
		<dc:creator>Abhijeet</dc:creator>
		<pubDate>Sun, 04 Oct 2009 19:44:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1783</guid>
		<description>Thanks for the informative post.

But I can&#039;t get the base class of your code to compile.
Your abstract base class Filter contains a private class, the FilterIterator. This FilterIterator has a toNext method, which internally calls the abstract method passes. This is where my code fails to compile.
&quot;The method passes(T) in the type Filter is not applicable for the arguments (T)&quot;
Is it even valid for an abstract method to be invoked this way?
Or have I got my generics all wrong?</description>
		<content:encoded><![CDATA[<p>Thanks for the informative post.</p>
<p>But I can&#8217;t get the base class of your code to compile.<br />
Your abstract base class Filter contains a private class, the FilterIterator. This FilterIterator has a toNext method, which internally calls the abstract method passes. This is where my code fails to compile.<br />
&#8220;The method passes(T) in the type Filter is not applicable for the arguments (T)&#8221;<br />
Is it even valid for an abstract method to be invoked this way?<br />
Or have I got my generics all wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rx</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1782</link>
		<dc:creator>Rx</dc:creator>
		<pubDate>Mon, 06 Jul 2009 20:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1782</guid>
		<description>Thanks Erik - the Filter is a very clever and indeed a VERY powerful pattern. Used it to construct complex filters (composite AND/OR, inverters) on different business objects - very handy and powerful especially with code flexibility and reusability in mind.

to Hardwareguy: you really think so? Well, THAT is why youre the HARDWARE guy.</description>
		<content:encoded><![CDATA[<p>Thanks Erik &#8211; the Filter is a very clever and indeed a VERY powerful pattern. Used it to construct complex filters (composite AND/OR, inverters) on different business objects &#8211; very handy and powerful especially with code flexibility and reusability in mind.</p>
<p>to Hardwareguy: you really think so? Well, THAT is why youre the HARDWARE guy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik R.</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1781</link>
		<dc:creator>Erik R.</dc:creator>
		<pubDate>Fri, 15 May 2009 15:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1781</guid>
		<description>HG, I guess the two main reasons would be clarity and code reuse.  But I suppose one man&#039;s clarity is another man&#039;s obfuscation.</description>
		<content:encoded><![CDATA[<p>HG, I guess the two main reasons would be clarity and code reuse.  But I suppose one man&#8217;s clarity is another man&#8217;s obfuscation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hardwareguy</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1780</link>
		<dc:creator>Hardwareguy</dc:creator>
		<pubDate>Thu, 14 May 2009 19:34:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1780</guid>
		<description>Should I be the only one to bring up the elephant in the room? The code at the top we&#039;re trying to get rid of is smaller, faster, less error prone, easier to test, more easily readable...I could go on.  Why would you want to implement the filter pattern except as a programming exercise?</description>
		<content:encoded><![CDATA[<p>Should I be the only one to bring up the elephant in the room? The code at the top we&#8217;re trying to get rid of is smaller, faster, less error prone, easier to test, more easily readable&#8230;I could go on.  Why would you want to implement the filter pattern except as a programming exercise?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Young</title>
		<link>http://erikras.com/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1779</link>
		<dc:creator>Phil Young</dc:creator>
		<pubDate>Thu, 04 Dec 2008 18:54:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.erik-rasmussen.com/blog/2008/01/18/the-filter-pattern-java-conditional-abstraction-with-iterables/#comment-1779</guid>
		<description>Erik, making the parameter final got past the compilation error. The Filter is a very useful concept. Thanks, Phil</description>
		<content:encoded><![CDATA[<p>Erik, making the parameter final got past the compilation error. The Filter is a very useful concept. Thanks, Phil</p>
]]></content:encoded>
	</item>
</channel>
</rss>

