Reputation: 13257
How to specify comparator for following map of map
ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], Object>>> myIndex;
Will the following declaration correct
myIndex = new ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], Object>>>(new MyCustomComparator)
Will this comparator be applicable to inner ConcurrentSkipListMap
Upvotes: 2
Views: 74
Reputation: 7804
No it wont be applicable to inner ConcurrentSkipListMap. You have to pass it to the constructor of the inner ConcurrentSkipListMap(), when you create a instance of the inner map.
Upvotes: 1