<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Find Answers For ... - Recent questions tagged duplicate</title>
<link>https://find4answers.com/tag/duplicate</link>
<description>Powered by Question2Answer</description>
<item>
<title>Is there any method to determine if a hashmap has duplicate values or not ?</title>
<link>https://find4answers.com/357/there-any-method-determine-hashmap-has-duplicate-values-not</link>
<description>&lt;p&gt;
	So I should find whether the &lt;code&gt;Map&lt;/code&gt; has duplicate values. I know we can iterate over the &lt;code&gt;Map&lt;/code&gt; and use the return boolean of &lt;code&gt;map.containsValue(value)&lt;/code&gt;. I want to know whether any method exists to&amp;nbsp;tell if a hashmap has&amp;nbsp;duplicate values in&amp;nbsp;it or we should&amp;nbsp; write code to ourselves?&lt;/p&gt;</description>
<category>Java/J2EE</category>
<guid isPermaLink="true">https://find4answers.com/357/there-any-method-determine-hashmap-has-duplicate-values-not</guid>
<pubDate>Wed, 14 Aug 2013 14:25:26 +0000</pubDate>
</item>
<item>
<title>How to remove duplicate values from a hashmap in java?</title>
<link>https://find4answers.com/355/how-to-remove-duplicate-values-from-a-hashmap-in-java</link>
<description>&lt;p&gt;
	I have a map with duplicate values:&lt;/p&gt;
&lt;blockquote&gt;
	&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;&quot;&gt;
&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;A&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;B&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;2&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;C&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;2&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;D&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;3&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;E&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;3&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	I would like to the map to have&lt;/p&gt;
&lt;blockquote&gt;
	&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;&quot;&gt;
&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;A&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;B&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;2&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;D&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;3&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	Do you know how to get rid of the duplicate values?&lt;/p&gt;</description>
<category>Java/J2EE</category>
<guid isPermaLink="true">https://find4answers.com/355/how-to-remove-duplicate-values-from-a-hashmap-in-java</guid>
<pubDate>Wed, 14 Aug 2013 14:13:22 +0000</pubDate>
</item>
</channel>
</rss>