Java “Type parameter X is not within its bound; should implement Comparable” (LocalDateTime as key in map)

后端 未结 1 2030
自闭症患者
自闭症患者 2021-01-20 11:38

I have implemented my own Map called AVLTreeMap. Here is the class signature.

public class AVLTreeMap, V>
1条回答
  •  孤街浪徒
    2021-01-20 11:49

    Your generic signature for a Comparable is a little off, this

    public class AVLTreeMap, V>
    

    Should be something like

    public class AVLTreeMap, V>
    

    0 讨论(0)
提交回复
热议问题