I saw that java can’t handle unsigned long…
If yes, can any one post the code? Thanks.
I saw that java can’t handle unsigned long… If yes, can any one post
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you going to be interoperating with languages featuring unsigned types? If not you can probably just use the standard java long without a problem. It will probably overflow anyways (as per the discussion here djb2 Hash Function) but that’s not a problem.
Here’s a PermissionSet class in the wild using this implementation. Don’t forget that a hashCode in Java needs to return an integer anyways, so the lack of an unsigned long should not make a difference – there will just be fewer possible values that the function takes on.