<?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: Getting rid of switch statements with Java Enums</title>
	<atom:link href="http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/</link>
	<description>Thoughtworker, Agile Philosopher, Hero</description>
	<lastBuildDate>Sun, 11 Sep 2011 04:15:23 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Alexander Starcevic</title>
		<link>http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/comment-page-1/#comment-17522</link>
		<dc:creator>Alexander Starcevic</dc:creator>
		<pubDate>Mon, 06 Dec 2010 00:19:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/#comment-17522</guid>
		<description>I just bookmarked your blog post, thank-you.</description>
		<content:encoded><![CDATA[<p>I just bookmarked your blog post, thank-you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Marler</title>
		<link>http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/comment-page-1/#comment-10874</link>
		<dc:creator>Jonathan Marler</dc:creator>
		<pubDate>Thu, 15 Apr 2010 21:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/#comment-10874</guid>
		<description>Very useful, a great natural design for using enums.

Also, this is not a big deal, but in order to compile your example I had to add a semi-colon at the end of line 7. 

1.enum Friend {
2.    Joey {
3.        Friend bestFriend() { return Chandler; }
4.    },
5.    Chandler {
6.        Friend bestFriend() { return Joey; }
7.    }
8.    abstract Friend bestFriend();
9.}</description>
		<content:encoded><![CDATA[<p>Very useful, a great natural design for using enums.</p>
<p>Also, this is not a big deal, but in order to compile your example I had to add a semi-colon at the end of line 7. </p>
<p>1.enum Friend {<br />
2.    Joey {<br />
3.        Friend bestFriend() { return Chandler; }<br />
4.    },<br />
5.    Chandler {<br />
6.        Friend bestFriend() { return Joey; }<br />
7.    }<br />
8.    abstract Friend bestFriend();<br />
9.}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Bartmann</title>
		<link>http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/comment-page-1/#comment-7267</link>
		<dc:creator>Bill Bartmann</dc:creator>
		<pubDate>Thu, 03 Sep 2009 16:36:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/#comment-7267</guid>
		<description>Cool site, love the info.</description>
		<content:encoded><![CDATA[<p>Cool site, love the info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Kemper</title>
		<link>http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/comment-page-1/#comment-6480</link>
		<dc:creator>Kris Kemper</dc:creator>
		<pubDate>Thu, 23 Jul 2009 02:05:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/#comment-6480</guid>
		<description>Thanks Vivek! I generated the code using Jad - decompiler for eclipse. It became hard to find for a while since the main website went down, but there are mirrors for it now. Check out: http://www.varaneckas.com/jad</description>
		<content:encoded><![CDATA[<p>Thanks Vivek! I generated the code using Jad &#8211; decompiler for eclipse. It became hard to find for a while since the main website went down, but there are mirrors for it now. Check out: <a href="http://www.varaneckas.com/jad" rel="nofollow">http://www.varaneckas.com/jad</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vivek</title>
		<link>http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/comment-page-1/#comment-6435</link>
		<dc:creator>vivek</dc:creator>
		<pubDate>Tue, 21 Jul 2009 06:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/#comment-6435</guid>
		<description>good article.  I don&#039;t know how you got the generated code for Enum but it is useful to see how Enum are treated internally.  Makes it very clear that each enum is a full fledged object instance.</description>
		<content:encoded><![CDATA[<p>good article.  I don&#8217;t know how you got the generated code for Enum but it is useful to see how Enum are treated internally.  Makes it very clear that each enum is a full fledged object instance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitry Kandalov</title>
		<link>http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/comment-page-1/#comment-1019</link>
		<dc:creator>Dmitry Kandalov</dc:creator>
		<pubDate>Mon, 20 Oct 2008 12:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kriskemper.com/2008/10/19/getting-rid-of-switch-statements-with-java-enums/#comment-1019</guid>
		<description>Great post. I&#039;ve had a similar problem with enums but I didn&#039;t dig so deep why forward referencing doesn&#039;t work.

enum Friend {
	Joey(Friend.Chandler),
	Chandler(Joey);
...
}
won&#039;t compile with Sun compiler (jdk1.6_06). So using anonymous enums is probably the only way to go.</description>
		<content:encoded><![CDATA[<p>Great post. I&#8217;ve had a similar problem with enums but I didn&#8217;t dig so deep why forward referencing doesn&#8217;t work.</p>
<p>enum Friend {<br />
	Joey(Friend.Chandler),<br />
	Chandler(Joey);<br />
&#8230;<br />
}<br />
won&#8217;t compile with Sun compiler (jdk1.6_06). So using anonymous enums is probably the only way to go.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

