0

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();
Hari
  • 441
  • 6
  • 15

1 Answers1

1

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

Jan Kotek
  • 1,084
  • 7
  • 4
  • same goes for BTreeMap as well? I have extended implementation for SerializerString and overriden compare method which does case insensitive comparison. Do I need to override equals and hashCode in this case? – eatSleepCode Jun 13 '19 at 08:12