Top "Hashmap" questions

A data structure that uses a hash function to map identifying values, known as keys, to their associated values

Sorting a HashMap by date

In a Java class I have a method to reOrder an existing HashMap by date. The HashMap is of a …

java sorting hashmap xpages
TBB Concurrent Hash map

I am implementing tbb's concurrent hash map to compare the performance of it against a suite of other concurrent hash …

c++ hashmap tbb concurrenthashmap
Why use EnumMap instead of HashMap

As we already have HashMap, why would we use EnumMap?

java hashmap enum-map
Create a Map of Array of Structs in golang?

I had a Json of format { ..., "tclist":[{ "tcID":"TC1", "tcp":"/home/1.py", "time":"20:00:40" }, { "tcID":"TC2", "tcp":"/home/1.py", "time":"048:50:06" }], ... } I …

go hashmap associative-array linkedhashmap linkedhashset
Why is the initialCapacity of Hashtable 11 while the DEFAULT_INITIAL_CAPACITY in HashMap is 16 and requires a power of 2?

Comparing the HashMap and Hashtable source code in JDK 1.6, I saw the below code inside HashMap: /** * The default initial capacity …

java hashmap hashtable
Java: how to find top 10 most common String + frequency in ArrayList?

I am trying to find the top 10 most common Strings in an ArrayList + their count (frequency of occurrence). How may …

java arraylist hashmap duplicates topmost
Are there any drawbacks with ConcurrentHashMap?

I need a HashMap that is accessible from multiple threads. There are two simple options, using a normal HashMap and …

java multithreading hashmap concurrenthashmap java.util.concurrent
JAXB HashMap unmappable

I want to convert a HashMap in a POJO class to XML. I tried using the XmlAdapter but it results …

java jaxb hashmap oxm
Guava ImmutableMap has noticeably slower access than HashMap

While working on a memory benchmark of some high-throughput data structures, I realized I could use an ImmutableMap with only …

java performance hashmap benchmarking guava
HashMap with weak values

I'm implementing a cache for Objects stored persistently. The idea is: Method getObjectFromPersistence(long id); ///Takes about 3 seconds Method getObjectFromCache(…

java android hashmap weak-references