This commit is contained in:
Looly
2023-03-30 23:15:25 +08:00
parent c9024ba8f9
commit 410f53ffd7

View File

@@ -12,6 +12,8 @@
package cn.hutool.core.codec; package cn.hutool.core.codec;
import java.util.Objects;
/** /**
* 128位数字表示分高位和低位 * 128位数字表示分高位和低位
* *
@@ -99,4 +101,21 @@ public class Number128 extends Number {
public double doubleValue() { public double doubleValue() {
return longValue(); return longValue();
} }
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o instanceof Number128) {
final Number128 number128 = (Number128) o;
return lowValue == number128.lowValue && highValue == number128.highValue;
}
return false;
}
@Override
public int hashCode() {
return Objects.hash(lowValue, highValue);
}
} }