1# 覆盖equals方法的通用约定
1.自反性(reflexive) 自己跟自己的比较必须返回true
2.对称性(symmetric) x=y那么y=z
3.传递性(transitive) x=y同时y=z那么x=z
4.一致性(consistent) 只要equals比较多的对象没有被修改那么 第一次x=y那么接下来的无论多少次x都等于y
5.对于x.equlas(null)必须返回false x不为null
原文:https://www.cnblogs.com/KAstandardization/p/10691422.html