2023-04-05 16:16:32 +00:00
|
|
|
package dev.toad.ffi;
|
|
|
|
|
2023-04-05 17:08:25 +00:00
|
|
|
import java.math.BigInteger;
|
|
|
|
|
2023-04-05 16:16:32 +00:00
|
|
|
public final class u64 {
|
|
|
|
|
2023-04-05 17:08:25 +00:00
|
|
|
public static final BigInteger MAX = BigInteger.TWO
|
|
|
|
.pow(64)
|
|
|
|
.subtract(BigInteger.ONE);
|
|
|
|
private final BigInteger l;
|
2023-04-05 16:16:32 +00:00
|
|
|
|
2023-04-05 17:08:25 +00:00
|
|
|
public u64(BigInteger l) {
|
|
|
|
uint.assertWithinRange(this.MAX, l);
|
2023-04-05 16:16:32 +00:00
|
|
|
this.l = l;
|
|
|
|
}
|
|
|
|
|
2023-04-05 17:08:25 +00:00
|
|
|
public u64(long l) {
|
|
|
|
this(BigInteger.valueOf(l));
|
|
|
|
}
|
|
|
|
|
|
|
|
public BigInteger bigintValue() {
|
2023-04-05 16:16:32 +00:00
|
|
|
return this.l;
|
|
|
|
}
|
|
|
|
}
|