@Test(expected = NullPointerException.class) public void shouldThrowNullPointerExceptionIfNullMapperPassedToMapFifth() throws Exception { Septuple<Integer, String, Boolean, Double, Long, Name, Colour> septuple = tuple(5, "Five", true, 3.6, 2L, name("Ellen"), colour("Green")); Mapper<Long, String> mapper = null; septuple.mapFifth(mapper); }
@Override public <A> Septuple<R, S, T, U, A, W, X> mapFifth(UnaryFunction<V, A> function) { return septuple(getFirst(), getSecond(), getThird(), getFourth(), function.call(getFifth()), getSixth(), getSeventh()); }
Septuple extends Sextuple<R, S, T, U, V, W> implements Seventh<X>,
                   MappableSeventh<X, Septuple<R, S, T, U, V, W, ?>> { @Override public <A> Septuple<R, S, T, U, A, W, X> mapFifth(UnaryFunction<V, A> function) { return septuple(getFirst(), getSecond(), getThird(), getFourth(), function.call(getFifth()), getSixth(), getSeventh()); } }
Septuple extends Sextuple<R, S, T, U, V, W> implements Seventh<X>,
                   MappableSeventh<X, Septuple<R, S, T, U, V, W, ?>> { @Override public <A> Septuple<R, S, T, U, A, W, X> mapFifth(UnaryFunction<V, A> function) { return septuple(getFirst(), getSecond(), getThird(), getFourth(), function.call(getFifth()), getSixth(), getSeventh()); } Septuple(R first, S second, T third, U fourth, V fifth, W sixth, X seventh); }
Septuple extends Sextuple<R, S, T, U, V, W> implements Seventh<X>,
                   MappableSeventh<X, Septuple<R, S, T, U, V, W, ?>> { @Override public <A> Septuple<R, S, T, U, A, W, X> mapFifth(UnaryFunction<V, A> function) { return septuple(getFirst(), getSecond(), getThird(), getFourth(), function.call(getFifth()), getSixth(), getSeventh()); } Septuple(R first, S second, T third, U fourth, V fifth, W sixth, X seventh); static Septuple<R, S, T, U, V, W, X> septuple(R first, S second, T third, U fourth, V fifth, W sixth, X seventh); @Override X getSeventh(); @Override Septuple<A, S, T, U, V, W, X> mapFirst(UnaryFunction<R, A> function); @Override Septuple<R, A, T, U, V, W, X> mapSecond(UnaryFunction<S, A> function); @Override Septuple<R, S, A, U, V, W, X> mapThird(UnaryFunction<T, A> function); @Override Septuple<R, S, T, A, V, W, X> mapFourth(UnaryFunction<U, A> function); @Override Septuple<R, S, T, U, A, W, X> mapFifth(UnaryFunction<V, A> function); @Override Septuple<R, S, T, U, V, A, X> mapSixth(UnaryFunction<W, A> function); @Override Septuple<R, S, T, U, V, W, A> mapSeventh(UnaryFunction<X, A> function); @Override Iterable<Object> getValues(); }
Septuple extends Sextuple<R, S, T, U, V, W> implements Seventh<X>,
                   MappableSeventh<X, Septuple<R, S, T, U, V, W, ?>> { @Override public <A> Septuple<R, S, T, U, A, W, X> mapFifth(UnaryFunction<V, A> function) { return septuple(getFirst(), getSecond(), getThird(), getFourth(), function.call(getFifth()), getSixth(), getSeventh()); } Septuple(R first, S second, T third, U fourth, V fifth, W sixth, X seventh); static Septuple<R, S, T, U, V, W, X> septuple(R first, S second, T third, U fourth, V fifth, W sixth, X seventh); @Override X getSeventh(); @Override Septuple<A, S, T, U, V, W, X> mapFirst(UnaryFunction<R, A> function); @Override Septuple<R, A, T, U, V, W, X> mapSecond(UnaryFunction<S, A> function); @Override Septuple<R, S, A, U, V, W, X> mapThird(UnaryFunction<T, A> function); @Override Septuple<R, S, T, A, V, W, X> mapFourth(UnaryFunction<U, A> function); @Override Septuple<R, S, T, U, A, W, X> mapFifth(UnaryFunction<V, A> function); @Override Septuple<R, S, T, U, V, A, X> mapSixth(UnaryFunction<W, A> function); @Override Septuple<R, S, T, U, V, W, A> mapSeventh(UnaryFunction<X, A> function); @Override Iterable<Object> getValues();  }