Sign in
third-party-mirror
/
typetools
/
checker-framework
/
refs/heads/main
/
.
/
checker
/
tests
/
index
/
ComputeConst.java
blob: 2616ddbc8da8eb4226dd9bd2c477003a157e95b3 [
file
] [
log
] [
blame
]
public
class
ComputeConst
{
public
static
int
hash
(
long
l
)
{
// If possible, use the value itself.
if
(
l
>=
Integer
.
MIN_VALUE
&&
l
<=
Integer
.
MAX_VALUE
)
{
return
(
int
)
l
;
}
return
Long
.
hashCode
(
l
);
}
}