@Test public void innerJoin() { Index<Character, String> left = Index.on(Stream.of("apple", "banana", "bazooka", "carrot", "catalepsy"), indexOnFirstChar); Index<Character, String> right = Index.on(Stream.of("atrophy", "anomie", "ballistic", "banausic", "copious"), indexOnFirstChar); assertThat(left.innerJoin(right).collect(Collectors.toList()), hasItems( T2.of("apple", "atrophy"), T2.of("apple", "anomie"), T2.of("banana", "ballistic"), T2.of("banana", "banausic"), T2.of("bazooka", "ballistic"), T2.of("bazooka", "banausic"), T2.of("carrot", "copious"), T2.of("catalepsy", "copious"))); }
public <R> Stream<T2<L, R>> innerJoin(Index<K, R> other) { return matchAndMerge(other, innerJoinMerger()); }
Index { public <R> Stream<T2<L, R>> innerJoin(Index<K, R> other) { return matchAndMerge(other, innerJoinMerger()); } }
Index { public <R> Stream<T2<L, R>> innerJoin(Index<K, R> other) { return matchAndMerge(other, innerJoinMerger()); } private  Index(Comparator<? super K> comparator, SortedMap<K, Set<L>> indexed); }
Index { public <R> Stream<T2<L, R>> innerJoin(Index<K, R> other) { return matchAndMerge(other, innerJoinMerger()); } private  Index(Comparator<? super K> comparator, SortedMap<K, Set<L>> indexed); static Index<K, L> on(Stream<? extends L> stream, Function<? super L, ? extends K> key); static Index<K, L> on(Stream<? extends L> stream, Function<? super L, ? extends K> key, Comparator<? super K> comparator); Spliterator<Map.Entry<K, Set<L>>> entrySpliterator(); Set<K> keys(); Stream<T2<L, Set<R>>> oneToMany(Index<K, R> other); Stream<T2<L, Set<R>>> strictOneToMany(Index<K, R> other); Stream<T2<L, R>> manyToOne(Index<K, R> other); Stream<T2<L, R>> strictManyToOne(Index<K, R> other); Stream<T2<L, R>> strictOneToOne(Index<K, R> other); Stream<T2<L, Optional<R>>> leftOuterJoin(Index<K, R> other); Stream<T2<Optional<L>, R>> rightOuterJoin(Index<K, R> other); Stream<T2<L, R>> innerJoin(Index<K, R> other); Stream<T2<Optional<L>, Optional<R>>> outerJoin(Index<K, R> other); @Override String toString(); }
Index { public <R> Stream<T2<L, R>> innerJoin(Index<K, R> other) { return matchAndMerge(other, innerJoinMerger()); } private  Index(Comparator<? super K> comparator, SortedMap<K, Set<L>> indexed); static Index<K, L> on(Stream<? extends L> stream, Function<? super L, ? extends K> key); static Index<K, L> on(Stream<? extends L> stream, Function<? super L, ? extends K> key, Comparator<? super K> comparator); Spliterator<Map.Entry<K, Set<L>>> entrySpliterator(); Set<K> keys(); Stream<T2<L, Set<R>>> oneToMany(Index<K, R> other); Stream<T2<L, Set<R>>> strictOneToMany(Index<K, R> other); Stream<T2<L, R>> manyToOne(Index<K, R> other); Stream<T2<L, R>> strictManyToOne(Index<K, R> other); Stream<T2<L, R>> strictOneToOne(Index<K, R> other); Stream<T2<L, Optional<R>>> leftOuterJoin(Index<K, R> other); Stream<T2<Optional<L>, R>> rightOuterJoin(Index<K, R> other); Stream<T2<L, R>> innerJoin(Index<K, R> other); Stream<T2<Optional<L>, Optional<R>>> outerJoin(Index<K, R> other); @Override String toString();  }