I saw that java can't handle unsigned long... If yes, can any one post the code? Thanks.
Asked
Active
Viewed 3,019 times
1 Answers
2
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.