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

3
LINES

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

JavaX fragment (include)

1  
sbool eqOrSame(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 #1007768

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022398
Snippet name: eqOrSame - same semantics as eq(), but explicitly checks a == b first
Eternal ID of this version: #1022398/3
Text MD5: 89558293ca900754b1732eddc450c181
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-16 19:39:34
Source code size: 96 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 299 / 322
Version history: 2 change(s)
Referenced in: [show references]