Integer和Long不能直接equals比较会返回False
public boolean equals(Object obj) {
if (obj instanceof Long) {
return this.value == (Long)obj;
} else {
return false;
}
}
public boolean equals(Object obj) {
if (obj instanceof Integer) {
return this.value == (Integer)obj;
} else {
return false;
}
}