Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

3
LINES

< > BotCompany Repo | #1030254 // sameOrEq - same semantics as eq(), but explicitly checks a == b first

JavaX fragment (include)

1  
sbool sameOrEq(O a, O b) {
2  
  ret a == null ? b == null : a == b || b != null && a.equals(b);
3  
}

Author comment

Began life as a copy of #1022398

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030254
Snippet name: sameOrEq - same semantics as eq(), but explicitly checks a == b first
Eternal ID of this version: #1030254/1
Text MD5: 46f50e024c53b6a4f4403f1599a205e3
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-20 23:41:21
Source code size: 96 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 108 / 138
Referenced in: [show references]