@Test public void testTuple() { final Tuple<String, String> homer = Tuple.of("homer", "simpson"); final Tuple<String, String> homer2 = Tuple.of("homer", "simpson"); final Tuple<String, String> marge = Tuple.of("marge", "simpson"); assertNotNull(homer); assertNotNull(homer2); assertNotNull(marge); assertEquals(homer, homer); assertEquals(homer, homer2); assertEquals(homer.hashCode(), homer2.hashCode()); assertNotEquals(homer, marge); assertNotEquals(homer2, marge); assertEquals("homer", homer.getVal1()); assertEquals("simpson", homer.getVal2()); assertEquals("marge", marge.getVal1()); assertEquals("simpson", marge.getVal2()); }
private Tuple(final A val1, final B val2) { this.val1 = val1; this.val2 = val2; }
Tuple { private Tuple(final A val1, final B val2) { this.val1 = val1; this.val2 = val2; } }
Tuple { private Tuple(final A val1, final B val2) { this.val1 = val1; this.val2 = val2; } private  Tuple(final A val1, final B val2); }
Tuple { private Tuple(final A val1, final B val2) { this.val1 = val1; this.val2 = val2; } private  Tuple(final A val1, final B val2); static Tuple<A, B> of(final A val1, final B val2); A getVal1(); B getVal2(); @Override int hashCode(); @Override boolean equals(final Object object); }
Tuple { private Tuple(final A val1, final B val2) { this.val1 = val1; this.val2 = val2; } private  Tuple(final A val1, final B val2); static Tuple<A, B> of(final A val1, final B val2); A getVal1(); B getVal2(); @Override int hashCode(); @Override boolean equals(final Object object);  }