Search code examples
mapdb

How to create HTreeMap with case insensitive key?


I have created HTreeMap with the following syntax but how should I specify case insensitive on the key. if there is a entry in the map with the key TOMAS, the method contains should return true when checked with string tomas.

HTreeMap<String, String>p_LocalMap=p_DB.createHashMap("Map1")
        .keySerializer(Serializer.STRING)
        .valueSerializer(Serializer.STRING)
        .make();

Solution

  • You need new Serilizer with HashCode, Equals and Compare methods overriden.