@Test public void testAccessingNegative() { assertThrows(IndexOutOfBoundsException.class, () -> somePair.nth(-1)); }
@Override public Object nth(int index) { assertIndexInBounds(index); if (index == 0) { return item1; } return item2; }
Tuple2 implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 0) { return item1; } return item2; } }
Tuple2 implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 0) { return item1; } return item2; } protected  Tuple2(L left, R right); }
Tuple2 implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 0) { return item1; } return item2; } protected  Tuple2(L left, R right); static Tuple2<L, R> of(L l, R r); L getItem1(); R getItem2(); Tuple2<T, R> mapItem1(Function<L, T> mapper); Tuple2<L, T> mapItem2(Function<R, T> mapper); @Override Object nth(int index); @Override List<Object> asList(); @Override boolean equals(Object o); @Override int hashCode(); int size(); @Override String toString(); }
Tuple2 implements Tuple { @Override public Object nth(int index) { assertIndexInBounds(index); if (index == 0) { return item1; } return item2; } protected  Tuple2(L left, R right); static Tuple2<L, R> of(L l, R r); L getItem1(); R getItem2(); Tuple2<T, R> mapItem1(Function<L, T> mapper); Tuple2<L, T> mapItem2(Function<R, T> mapper); @Override Object nth(int index); @Override List<Object> asList(); @Override boolean equals(Object o); @Override int hashCode(); int size(); @Override String toString();  }