Top "Hashset" questions

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

Convert comma separated string into a HashSet

So, how would you go about converting String csv = "11,00,33,66,44,33,22,00,11"; to a hashset in the quickest-most optimized way. This is for …

java csv hashset
How to convert hash Set into array using toArray() if the method toArray is not specified?

Looking at the java api for java collections framework, I could not find toArray() method in HashSet, there is toArray() …

java collections hashset
HashSet does not seem to realize that two objects are the same.

I'm trying to use HashSet to store objects of a class that I created, but apparently the same objects seem …

java hashset
Java HashSet with a custom equality criteria?

I was looking for something akin to the Java TreeSet's ability to receive a custom comparator at instantiation time, so …

java set hashset
ordering a hashset example?

I need an example on how to use a comparable class on a HashSet to get an ascending order. Let’…

java data-structures hashset comparable sortedset
Internal implementation of java.util.HashMap and HashSet

I have been trying to understand the internal implementation of java.util.HashMap and java.util.HashSet. Following are the …

java hashmap hashcode hashset language-implementation
Using the keySet() method in HashMap

I have a method that goes through the possible states in a board and stores them in a HashMap void …

java hashmap hashset linkedhashset
What is the difference between set and hashset in C++ STL?

When should I choose one over the other? Are there any pointers that you would recommend for using the right …

c++ performance stl set hashset
HashSet vs ArrayList contains performance

When processing large amounts of data I often find myself doing the following: HashSet<String> set = new HashSet&…

java arraylist hashset
Select an element by index from a .NET HashSet

At the moment I am using a custom class derived from HashSet. There's a point in the code when I …

c# .net hashset