@Test public void shouldConstructAPairWithTheSpecifiedValues() throws Exception { String first = "5"; Integer second = 4; Pair<String, Integer> expected = new Pair<String, Integer>(first, second); Pair<String, Integer> actual = pair(first, second); assertThat(actual, is(expected)); }
public static <R, S> Pair<R, S> pair(R first, S second) { return new Pair<R, S>(first, second); }
Pair extends Single<R> implements Second<S>,
                   MappableSecond<S, Pair<R, ?>> { public static <R, S> Pair<R, S> pair(R first, S second) { return new Pair<R, S>(first, second); } }
Pair extends Single<R> implements Second<S>,
                   MappableSecond<S, Pair<R, ?>> { public static <R, S> Pair<R, S> pair(R first, S second) { return new Pair<R, S>(first, second); } Pair(R first, S second); }
Pair extends Single<R> implements Second<S>,
                   MappableSecond<S, Pair<R, ?>> { public static <R, S> Pair<R, S> pair(R first, S second) { return new Pair<R, S>(first, second); } Pair(R first, S second); static Pair<R, S> pair(R first, S second); @Override S getSecond(); @Override Pair<A, S> mapFirst(UnaryFunction<R, A> function); @Override Pair<R, A> mapSecond(UnaryFunction<S, A> function); @Override Iterable<Object> getValues(); }
Pair extends Single<R> implements Second<S>,
                   MappableSecond<S, Pair<R, ?>> { public static <R, S> Pair<R, S> pair(R first, S second) { return new Pair<R, S>(first, second); } Pair(R first, S second); static Pair<R, S> pair(R first, S second); @Override S getSecond(); @Override Pair<A, S> mapFirst(UnaryFunction<R, A> function); @Override Pair<R, A> mapSecond(UnaryFunction<S, A> function); @Override Iterable<Object> getValues();  }