如何为地图的地图
指定比较器ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], Object>>> myIndex;
以下声明是否正确
myIndex = new ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], ConcurrentSkipListMap<byte[], Object>>>(new MyCustomComparator)
此比较器是否适用于内部ConcurrentSkipListMap
答案 0 :(得分:1)
不,它不适用于内部ConcurrentSkipListMap。在创建内部映射的实例时,必须将它传递给内部ConcurrentSkipListMap()的构造函数。