@Test public void shouldMapToFifthOfSuppliedFifthable() throws Exception { Fifth<Character> fifthable = tuple("first", 2, true, 1.25, '5'); Character expected = '5'; Mapper<? super Fifth<Character>, Character> toFifth = Tuples.toFifth(); Character actual = toFifth.map(fifthable); assertThat(actual, is(expected)); }
public static <T> Mapper<? super Fifth<T>, T> toFifth() { return new Mapper<Fifth<T>, T>() { @Override public T map(Fifth<T> fifth) { return fifth.getFifth(); } }; }
Tuples { public static <T> Mapper<? super Fifth<T>, T> toFifth() { return new Mapper<Fifth<T>, T>() { @Override public T map(Fifth<T> fifth) { return fifth.getFifth(); } }; } }
Tuples { public static <T> Mapper<? super Fifth<T>, T> toFifth() { return new Mapper<Fifth<T>, T>() { @Override public T map(Fifth<T> fifth) { return fifth.getFifth(); } }; }  }
Tuples { public static <T> Mapper<? super Fifth<T>, T> toFifth() { return new Mapper<Fifth<T>, T>() { @Override public T map(Fifth<T> fifth) { return fifth.getFifth(); } }; }  static Mapper<Pair<K, V>, Map.Entry<K, V>> toMapEntry(); static Iterable<T> firsts(Iterable<? extends First<T>> firstables); static Iterable<T> seconds(Iterable<? extends Second<T>> secondables); static Iterable<T> thirds(Iterable<? extends Third<T>> thirdables); static Iterable<T> fourths(Iterable<? extends Fourth<T>> fourthables); static Iterable<T> fifths(Iterable<? extends Fifth<T>> fifthables); static Iterable<T> sixths(Iterable<? extends Sixth<T>> sixthable); static Iterable<T> sevenths(Iterable<? extends Seventh<T>> seventhable); static Iterable<T> eighths(Iterable<? extends Eighth<T>> eighthables); static Iterable<T> ninths(Iterable<? extends Ninth<T>> ninthables); static Mapper<? super First<T>, T> toFirst(); static Mapper<? super Second<T>, T> toSecond(); static Mapper<? super Third<T>, T> toThird(); static Mapper<? super Fourth<T>, T> toFourth(); static Mapper<? super Fifth<T>, T> toFifth(); static Mapper<? super Sixth<T>, T> toSixth(); static Mapper<? super Seventh<T>, T> toSeventh(); static Mapper<? super Eighth<T>, T> toEighth(); static Mapper<? super Ninth<T>, T> toNinth(); }
Tuples { public static <T> Mapper<? super Fifth<T>, T> toFifth() { return new Mapper<Fifth<T>, T>() { @Override public T map(Fifth<T> fifth) { return fifth.getFifth(); } }; }  static Mapper<Pair<K, V>, Map.Entry<K, V>> toMapEntry(); static Iterable<T> firsts(Iterable<? extends First<T>> firstables); static Iterable<T> seconds(Iterable<? extends Second<T>> secondables); static Iterable<T> thirds(Iterable<? extends Third<T>> thirdables); static Iterable<T> fourths(Iterable<? extends Fourth<T>> fourthables); static Iterable<T> fifths(Iterable<? extends Fifth<T>> fifthables); static Iterable<T> sixths(Iterable<? extends Sixth<T>> sixthable); static Iterable<T> sevenths(Iterable<? extends Seventh<T>> seventhable); static Iterable<T> eighths(Iterable<? extends Eighth<T>> eighthables); static Iterable<T> ninths(Iterable<? extends Ninth<T>> ninthables); static Mapper<? super First<T>, T> toFirst(); static Mapper<? super Second<T>, T> toSecond(); static Mapper<? super Third<T>, T> toThird(); static Mapper<? super Fourth<T>, T> toFourth(); static Mapper<? super Fifth<T>, T> toFifth(); static Mapper<? super Sixth<T>, T> toSixth(); static Mapper<? super Seventh<T>, T> toSeventh(); static Mapper<? super Eighth<T>, T> toEighth(); static Mapper<? super Ninth<T>, T> toNinth();  }