1 | static boolean stdEq2(O a, O b) { |
2 | if (a == null) ret b == null; |
3 | if (b == null) ret false; |
4 | if (a.getClass() != b.getClass()) ret false; |
5 | for (S field : allFields(a)) |
6 | if (neq(getOpt(a, field), getOpt(b, field))) |
7 | ret false; |
8 | ret true; |
9 | } |
Began life as a copy of #1005431
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005432 |
Snippet name: | stdEq2 - field-based equals function (uses all fields) |
Eternal ID of this version: | #1005432/3 |
Text MD5: | 18e8066fee264152737b48ce3e25dda5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-27 20:59:55 |
Source code size: | 259 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 558 / 587 |
Version history: | 2 change(s) |
Referenced in: | [show references] |