<?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>Kommentare zu: Multiple return values as class?</title>
	<atom:link href="http://blog.cloudme.org/2010/01/multiple-return-values-as-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cloudme.org/2010/01/multiple-return-values-as-class/</link>
	<description>Blog of the CloudMe Project by Moritz Petersen</description>
	<lastBuildDate>Sun, 27 Mar 2011 15:18:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Von: Christian</title>
		<link>http://blog.cloudme.org/2010/01/multiple-return-values-as-class/comment-page-1/#comment-253</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Mon, 31 May 2010 08:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cloudme.org/?p=71#comment-253</guid>
		<description>I included a Pair and Triple class in my projects and use them as typed return values. So its easy to return 2 or 3 values and the Generics offer some kind of type safety.</description>
		<content:encoded><![CDATA[<p>I included a Pair and Triple class in my projects and use them as typed return values. So its easy to return 2 or 3 values and the Generics offer some kind of type safety.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Moritz</title>
		<link>http://blog.cloudme.org/2010/01/multiple-return-values-as-class/comment-page-1/#comment-86</link>
		<dc:creator>Moritz</dc:creator>
		<pubDate>Mon, 11 Jan 2010 20:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cloudme.org/?p=71#comment-86</guid>
		<description>That&#039;s an idea...</description>
		<content:encoded><![CDATA[<p>That&#8217;s an idea&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Rusty Wright</title>
		<link>http://blog.cloudme.org/2010/01/multiple-return-values-as-class/comment-page-1/#comment-85</link>
		<dc:creator>Rusty Wright</dc:creator>
		<pubDate>Mon, 11 Jan 2010 20:58:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cloudme.org/?p=71#comment-85</guid>
		<description>Then make the method name describe what&#039;s happening; cropByPercentage for example.</description>
		<content:encoded><![CDATA[<p>Then make the method name describe what&#8217;s happening; cropByPercentage for example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Moritz</title>
		<link>http://blog.cloudme.org/2010/01/multiple-return-values-as-class/comment-page-1/#comment-84</link>
		<dc:creator>Moritz</dc:creator>
		<pubDate>Mon, 11 Jan 2010 07:57:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cloudme.org/?p=71#comment-84</guid>
		<description>The problem here is, that the crop operation transforms the coordinates into a different metric. While the input is pixel-based, the output is percentage. This would lead to misleading code, such as:

&lt;code&gt;&lt;pre&gt;
Rectangle r = new Rectangle(800, 600);
Rectangle cropped = r.crop(210, 210);
// cropped.w = 0.66f
// cropped.h = 1.0f
// huh?
&lt;/pre&gt;&lt;/code&gt;

That&#039;s why I decided for a special class.</description>
		<content:encoded><![CDATA[<p>The problem here is, that the crop operation transforms the coordinates into a different metric. While the input is pixel-based, the output is percentage. This would lead to misleading code, such as:</p>
<p><code>
<pre>
Rectangle r = new Rectangle(800, 600);
Rectangle cropped = r.crop(210, 210);
// cropped.w = 0.66f
// cropped.h = 1.0f
// huh?
</pre>
<p></code></p>
<p>That&#8217;s why I decided for a special class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Rusty Wright</title>
		<link>http://blog.cloudme.org/2010/01/multiple-return-values-as-class/comment-page-1/#comment-83</link>
		<dc:creator>Rusty Wright</dc:creator>
		<pubDate>Mon, 11 Jan 2010 02:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cloudme.org/?p=71#comment-83</guid>
		<description>I think it might be Item 15, Minimize Mutability.</description>
		<content:encoded><![CDATA[<p>I think it might be Item 15, Minimize Mutability.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Rusty Wright</title>
		<link>http://blog.cloudme.org/2010/01/multiple-return-values-as-class/comment-page-1/#comment-82</link>
		<dc:creator>Rusty Wright</dc:creator>
		<pubDate>Mon, 11 Jan 2010 02:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cloudme.org/?p=71#comment-82</guid>
		<description>I think I would create my own Rectangle class and add a method to it, cropped(float w, float h) which returns a new (immutable) Rectangle.  Similar to all those methods on java.lang.String; the original String is immutable and there are a bunch of converters or transformers, if you will, that return a new String.  Josh Bloch talks about this in one of his items in Effective Java.</description>
		<content:encoded><![CDATA[<p>I think I would create my own Rectangle class and add a method to it, cropped(float w, float h) which returns a new (immutable) Rectangle.  Similar to all those methods on java.lang.String; the original String is immutable and there are a bunch of converters or transformers, if you will, that return a new String.  Josh Bloch talks about this in one of his items in Effective Java.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

