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

24
LINES

< > BotCompany Repo | #1004216 - T3 - value triple - synonym: Triple

JavaX fragment (include)

static class T3<A, B, C> {
  A a;
  B b;
  C c;
  
  *() {}
  *(A *a, B *b, C *c) {}
  *(T3<A, B, C> t) { a = t.a; b = t.b; c = t.c; }
  
  public int hashCode() {
    ret _hashCode(a) + 2*_hashCode(b) - 4*_hashCode(c);
  }
  
  public bool equals(O o) {
    if (o == this) true;
    if (!(o instanceof T3)) false;
    T3 t = (T3) o;
    ret eq(a, t.a) && eq(b, t.b) && eq(c, t.c);
  }
  
  toString {
    ret "(" + quoteBorderless(a) + ", " + quoteBorderless(b) + ", " + quoteBorderless(c) + ")";
  }
}

download  show line numbers  debug dex   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, ppjhyzlbdabe, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1004216
Snippet name: T3 - value triple - synonym: Triple
Eternal ID of this version: #1004216/7
Text MD5: a3c8c0bdb47d35eae362cf0ddf41b911
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-13 23:36:05
Source code size: 526 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 372 / 2317
Version history: 6 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1004216 & http://1004216.tinybrain.de