Map.Entry

Map.Entry is the interface which your SortedMap's entries must implement. For the Treap, each entry is represented by a node in the treap. So the logical way to structure your code is to make your treap's node object implement Map.Entry. You can then implement methods like equals, hashCode, toString in this object.



MM Hugue 2019-03-03