<?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>Shad Aumann&#039;s Information Technology Leader &#187; Technical</title>
	<atom:link href="http://blog.shadit.com/index.php/tag/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.shadit.com</link>
	<description>Applying information technology as a business strategy multiplier.</description>
	<lastBuildDate>Fri, 23 Jul 2010 13:00:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Javadoc WIN &#8211; Map.keySet()</title>
		<link>http://blog.shadit.com/2010/01/08/javadoc-win-map-keyset/</link>
		<comments>http://blog.shadit.com/2010/01/08/javadoc-win-map-keyset/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 17:45:14 +0000</pubDate>
		<dc:creator>Shad Aumann</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.shadit.com/?p=136</guid>
		<description><![CDATA[This week, I was writing a class that implements the Set interface but uses a Map internally to track usage information about the contents of the Set.  I was implementing the removeAll() method, and wanted to use an Iterator over the Set returned by Map.keySet() in my method. My question was, will the remove() method [...]]]></description>
			<content:encoded><![CDATA[<p>This week, I was writing a class that implements the <tt>Set </tt> interface but uses a <tt>Map</tt> internally to track usage information about the contents of the <tt>Set</tt>.  I was implementing the <tt>removeAll()</tt> method, and wanted to use an <tt>Iterator</tt> over the <tt>Set </tt>returned by <tt>Map.keySet()</tt> in my method.</p>
<p>My question was, will the <tt>remove()</tt> method from an <tt>Iterator</tt> over a <tt>Set </tt>returned by <tt>Map.keySet()</tt> un-map the item from the underlying <tt>Map</tt>?</p>
<p><strong><a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#keySet()" target="_blank">The answer</a> is yes!</strong></p>
<p style="padding-left: 30px;">The set  supports element removal, which removes the corresponding mapping from  the map, via the <tt>Iterator.remove</tt>, <tt>Set.remove</tt>,  <tt>removeAll</tt> <tt>retainAll</tt>, and <tt>clear</tt> operations.  It does not support the <tt>add</tt> or <tt>addAll</tt> operations.</p>
<p>That is some <em>fine</em> documentation, folks!  As developers on our own systems, we know that our peers can always look at the code and try to figure out what is going on.  But, having documentation that allows the clients of your class to easily answer questions is vastly superior to people regularly resorting to looking at your code.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.shadit.com/2010/01/08/javadoc-win-map-keyset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.223 seconds -->
