<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>javablog.ch&#187; Commons Fundstücke</title>
	<atom:link href="http://www.javablog.ch/category/jakarta-commons-fundstucke/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javablog.ch</link>
	<description>Keep on learning...</description>
	<lastBuildDate>Sun, 04 Dec 2011 17:15:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Commons Fundstücke: StringEscapeUtils, EqualsBuilder und DateUtils</title>
		<link>http://www.javablog.ch/2006/12/17/commons-fundstucke-teil-2/</link>
		<comments>http://www.javablog.ch/2006/12/17/commons-fundstucke-teil-2/#comments</comments>
		<pubDate>Sun, 17 Dec 2006 22:34:05 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
				<category><![CDATA[Commons Fundstücke]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2006/12/17/commons-fundstucke-teil-2/</guid>
		<description><![CDATA[Die Fundstücke kommen diesmal ebenfalls aus der commons lang Bibliothek. org.apache.commons.lang.StringEscapeUtils Bietet Methoden für Escaping und Unescaping für die Sprachen Java, JavaScript, HTML, XML und SQL. org.apache.commons.lang.builder.EqualsBuilder Erleichtert die Programmierung für equals Methode nach den Regeln aus dem Buch &#8220;Effektiv Java programmieren&#8221; von Joshua Bloch. Analog dazu org.apache.commons.lang.builder.HashCodeBuilder org.apache.commons.lang.builder.ToStringBuilder org.apache.commons.lang.builder.CompareToBuilder org.apache.commons.lang.time.DateUtils Mehrere Methoden rund um [...]]]></description>
			<content:encoded><![CDATA[<p>Die Fundstücke kommen diesmal ebenfalls aus der <a href="http://jakarta.apache.org/commons/lang/">commons lang </a>Bibliothek.</p>
<ol>
<li>
<code><a href="http://jakarta.apache.org/commons/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html">org.apache.commons.lang.StringEscapeUtils </a></code></p>
<p>Bietet Methoden für Escaping und Unescaping für die Sprachen Java, JavaScript, HTML, XML und SQL.
</li>
<li>
<code><a href="http://jakarta.apache.org/commons/lang/api-release/org/apache/commons/lang/builder/EqualsBuilder.html">org.apache.commons.lang.builder.EqualsBuilder</a></code></p>
<p>Erleichtert die Programmierung für equals Methode nach den<br />
Regeln aus dem Buch &#8220;Effektiv Java programmieren&#8221; von Joshua Bloch. </p>
<p>Analog dazu<br />
<code><a href="http://jakarta.apache.org/commons/lang/api-release/org/apache/commons/lang/builder/HashCodeBuilder.html">org.apache.commons.lang.builder.HashCodeBuilder</a><br />
<a href="http://jakarta.apache.org/commons/lang/api-release/org/apache/commons/lang/builder/ToStringBuilder.html">org.apache.commons.lang.builder.ToStringBuilder</a><br />
<a href="http://jakarta.apache.org/commons/lang/api-release/org/apache/commons/lang/builder/CompareToBuilder.html">org.apache.commons.lang.builder.CompareToBuilder</a></code>
</li>
<li>
<a href="http://jakarta.apache.org/commons/lang/api-release/org/apache/commons/lang/time/DateUtils.html">org.apache.commons.lang.time.DateUtils</a></p>
<p>Mehrere Methoden rund um <code>Date </code>und <code>Calendar. </code> Praktisch ist beispielsweise die<br />
<code>round </code>Methode, die das <code>Date </code>Objekt nach dem übergebenen Kriterium (bsp. <code>Calendar.MONTH</code>) rundet.
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2006/12/17/commons-fundstucke-teil-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Commons Fundstücke: StopWatch</title>
		<link>http://www.javablog.ch/2006/12/05/commons-lang-stopwatch/</link>
		<comments>http://www.javablog.ch/2006/12/05/commons-lang-stopwatch/#comments</comments>
		<pubDate>Mon, 04 Dec 2006 22:13:13 +0000</pubDate>
		<dc:creator>HeikoMaass</dc:creator>
				<category><![CDATA[Commons Fundstücke]]></category>

		<guid isPermaLink="false">http://www.javablog.ch/2006/12/05/commons-lang-stopwatch/</guid>
		<description><![CDATA[Diese neue Artikelserie stellt kleine, eher unspektakuläre, aber dennoch sehr praktische Klassen aus dem Jakarta Commons Projekt vor. Wir beginnen mit der StopWatch Klasse aus der commons lang Bibliothek. Die StopWatch Klasse erlaubt bequeme Messung von Zeitabständen ohne die händische Verwendung der System.currentTimeMillis() Methode. Typisches Einsatzgebiet sind Performancemessungen (&#8220;Wie lange braucht mein Code für die [...]]]></description>
			<content:encoded><![CDATA[<p>Diese neue Artikelserie stellt kleine, eher unspektakuläre, aber dennoch sehr praktische Klassen aus dem <a href="http://jakarta.apache.org/commons/">Jakarta Commons</a> Projekt vor. Wir beginnen mit der <code>StopWatch </code>Klasse aus der <a href="http://jakarta.apache.org/commons/lang/">commons lang</a> Bibliothek. </p>
<p>Die <code>StopWatch </code>Klasse erlaubt bequeme Messung von Zeitabständen ohne die händische Verwendung der <code>System.currentTimeMillis()</code> Methode. Typisches Einsatzgebiet sind Performancemessungen (&#8220;Wie lange braucht mein Code für die Ausführung&#8221;). Der Entwickler kann jederzeit den aktuellen Status abfragen und bei Bedarf die StopWatch auch pausieren. </p>
<p><strong>Beispielcode:</strong></p>
<div class="codeblock">
<div class="java" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import org.apache.commons.lang.time.StopWatch;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #537799;font-weight: bold;">StopWatch</span> stopWatch = <span style="color: #222222; font-weight: bold;">new</span> StopWatch<span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stopWatch.<span style="color: #537799;font-weight: bold;">start</span><span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Zeitaufwändige Aktion</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Pausieren der StopWatch</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stopWatch.<span style="color: #537799;font-weight: bold;">suspend</span><span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">... </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Fortführen der Messung</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stopWatch.<span style="color: #537799;font-weight: bold;">resume</span><span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">... </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Stoppen und verbrauchte Zeit ausgeben.</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">stopWatch.<span style="color: #537799;font-weight: bold;">stop</span><span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #222222; font-weight: bold;">long</span> neededTime = stopWatch.<span style="color: #537799;font-weight: bold;">getTime</span><span style="color: #111111;">&#40;</span><span style="color: #111111;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #415D77; ">System</span></a>.<span style="color: #537799;font-weight: bold;">out</span>.<span style="color: #537799;font-weight: bold;">println</span><span style="color: #111111;">&#40;</span><span style="color: #CF6F35;">&quot;needed time (in ms): &quot;</span> + neededTime<span style="color: #111111;">&#41;</span>;</div></li></ol></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.javablog.ch/2006/12/05/commons-lang-stopwatch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

