@Test(expected = NullPointerException.class) public void shouldThrowNullPointerExceptionIfNullMapperPassedToMapFirst() throws Exception { Triple<Integer, String, Boolean> triple = tuple(5, "Five", true); Mapper<Integer, String> mapper = null; triple.mapFirst(mapper); }
@Override public <A> Triple<A, S, T> mapFirst(UnaryFunction<R, A> function) { return triple(function.call(getFirst()), getSecond(), getThird()); }
Triple extends Pair<R, S> implements Third<T>,
                   MappableThird<T, Triple<R, S, ?>> { @Override public <A> Triple<A, S, T> mapFirst(UnaryFunction<R, A> function) { return triple(function.call(getFirst()), getSecond(), getThird()); } }
Triple extends Pair<R, S> implements Third<T>,
                   MappableThird<T, Triple<R, S, ?>> { @Override public <A> Triple<A, S, T> mapFirst(UnaryFunction<R, A> function) { return triple(function.call(getFirst()), getSecond(), getThird()); } Triple(R first, S second, T third); }
Triple extends Pair<R, S> implements Third<T>,
                   MappableThird<T, Triple<R, S, ?>> { @Override public <A> Triple<A, S, T> mapFirst(UnaryFunction<R, A> function) { return triple(function.call(getFirst()), getSecond(), getThird()); } Triple(R first, S second, T third); static Triple<R, S, T> triple(R first, S second, T third); @Override T getThird(); @Override Triple<A, S, T> mapFirst(UnaryFunction<R, A> function); @Override Triple<R, A, T> mapSecond(UnaryFunction<S, A> function); @Override Triple<R, S, A> mapThird(UnaryFunction<T, A> function); @Override Iterable<Object> getValues(); }
Triple extends Pair<R, S> implements Third<T>,
                   MappableThird<T, Triple<R, S, ?>> { @Override public <A> Triple<A, S, T> mapFirst(UnaryFunction<R, A> function) { return triple(function.call(getFirst()), getSecond(), getThird()); } Triple(R first, S second, T third); static Triple<R, S, T> triple(R first, S second, T third); @Override T getThird(); @Override Triple<A, S, T> mapFirst(UnaryFunction<R, A> function); @Override Triple<R, A, T> mapSecond(UnaryFunction<S, A> function); @Override Triple<R, S, A> mapThird(UnaryFunction<T, A> function); @Override Iterable<Object> getValues();  }