Top "Hashset" questions

A HashSet encapsulates operations that allow for the comparison of elements in collections.

Java all determine elements are same in a list

I am trying to determine to see if all elements in a list are same. such as: (10,10,10,10,10) --> true (10,10,20,30,30) …

java list hashset brute-force
Java: Duplicate objects getting added to set?

If I run the below code then the output is 2 which means that the set contains 2 elements. However I think …

java hash hashcode hashset
HashSet allows duplicate item insertion - C#

This kind of seems like a noob question, but I could not find an answer for this question specifically. I …

c# .net hashset
How do HashSets in Java work?

Possible Duplicate: How does Java hashmap work? Can someone explain to me how HashSets in java work and why they …

java hashset
Does HashSet preserve insertion order?

Does the HashSet collection introduced in .NET 3.5 preserve insertion order when iterated using foreach? The documentation states, that the collection …

.net hashset
How to use HashSet<string>.Contains() method in case -insensitive mode?

How to use HashSet<string>.Contains() method in case -insensitive mode?

c# string hashset
Ordering of elements in Java HashSet

Why do the second and third sets preserve order: Integer[] j = new Integer[]{3,4,5,6,7,8,9}; LinkedHashSet<Integer> i = new LinkedHashSet&…

java collections hashset linkedhashset
HashSet contains duplicate entries

A HashSet only stores values ones, when the equals method says that they're the same. Thats what I thought. But …

java set unique hashset
is Java HashSet thread-safe for read only?

If I have an instance of an HashSet after I ran it through Collections.unmodifiableSet(), is it thread-safe? I'm asking …

java concurrency hashset
Moving data from a HashSet to ArrayList in Java

I have the following Set in Java: Set< Set<String> > SetTemp = new HashSet< Set<…

java list data-structures arraylist hashset