Libraryless. Click here for Pure Java version (2081L/13K).
1 | static int stdHash(O a, S... fields) {
|
2 | if (a == null) ret 0; |
3 | int hash = getClassName(a).hashCode(); |
4 | for (S field : fields) |
5 | hash = boostHashCombine(hash, hashCode(getOpt(a, field))); |
6 | ret hash; |
7 | } |
Began life as a copy of #1002051
download show line numbers debug dex old transpilations
Travelled to 20 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mqqgnosmbjvj, mqsvbyillbrs, onxytkatvevr, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1003332 |
| Snippet name: | stdHash - field-based object hash function |
| Eternal ID of this version: | #1003332/6 |
| Text MD5: | 678d3a6fc6e5cf18e11312203799c103 |
| Transpilation MD5: | f8ea22762de819449db8ab059daedc0e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-09-12 22:07:17 |
| Source code size: | 211 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 913 / 1790 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |