@Test public void testAccessingNegative() { assertThrows(IndexOutOfBoundsException.class, () -> someTuple.nth(-1)); }
@Override public Object nth(int index) { assertIndexInBounds(index); if (index == 2) { return item3; } else { return super.nth(index); } }
Tuple3 extends Tuple2<T1, T2> implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 2) { return item3; } else { return super.nth(index); } } }
Tuple3 extends Tuple2<T1, T2> implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 2) { return item3; } else { return super.nth(index); } } Tuple3(T1 a, T2 b, T3 c); }
Tuple3 extends Tuple2<T1, T2> implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 2) { return item3; } else { return super.nth(index); } } Tuple3(T1 a, T2 b, T3 c); static Tuple3<T1, T2, T3> of(T1 a, T2 b, T3 c); T3 getItem3(); @Override Object nth(int index); @Override Tuple3<T, T2, T3> mapItem1(Function<T1, T> mapper); @Override Tuple3<T1, T, T3> mapItem2(Function<T2, T> mapper); Tuple3<T1, T2, T> mapItem3(Function<T3, T> mapper); @Override List<Object> asList(); @Override int size(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); }
Tuple3 extends Tuple2<T1, T2> implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 2) { return item3; } else { return super.nth(index); } } Tuple3(T1 a, T2 b, T3 c); static Tuple3<T1, T2, T3> of(T1 a, T2 b, T3 c); T3 getItem3(); @Override Object nth(int index); @Override Tuple3<T, T2, T3> mapItem1(Function<T1, T> mapper); @Override Tuple3<T1, T, T3> mapItem2(Function<T2, T> mapper); Tuple3<T1, T2, T> mapItem3(Function<T3, T> mapper); @Override List<Object> asList(); @Override int size(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }