Enumerables { public static <TSource, TInner, TKey> Enumerable<TSource> semiJoin( final Enumerable<TSource> outer, final Enumerable<TInner> inner, final Function1<TSource, TKey> outerKeySelector, final Function1<TInner, TKey> innerKeySelector) { Bug.upgrade("move into linq4j"); return semiJoin(outer, inner, outerKeySelector, innerKeySelector, null); } private  Enumerables(); static Enumerable<E> slice0(Enumerable<E[]> enumerable); static Enumerable<TSource> semiJoin(
      final Enumerable<TSource> outer, final Enumerable<TInner> inner,
      final Function1<TSource, TKey> outerKeySelector,
      final Function1<TInner, TKey> innerKeySelector); static Enumerable<TSource> semiJoin(
      final Enumerable<TSource> outer, final Enumerable<TInner> inner,
      final Function1<TSource, TKey> outerKeySelector,
      final Function1<TInner, TKey> innerKeySelector,
      final EqualityComparer<TKey> comparer); static Enumerable<TResult> thetaJoin(
      final Enumerable<TSource> outer, final Enumerable<TInner> inner,
      final Predicate2<TSource, TInner> predicate,
      Function2<TSource, TInner, TResult> resultSelector,
      final boolean generateNullsOnLeft,
      final boolean generateNullsOnRight); static Enumerable<TSource> where(
      final Enumerable<TSource> source, final Predicate1<TSource> predicate); static Enumerable<Row> toRow(final Enumerable<Object[]> enumerator); static Enumerable<TResult> mergeJoin(final Enumerable<TSource> outer,
      final Enumerable<TInner> inner,
      final Function1<TSource, TKey> outerKeySelector,
      final Function1<TInner, TKey> innerKeySelector,
      final Function2<TSource, TInner, TResult> resultSelector,
      boolean generateNullsOnLeft,
      boolean generateNullsOnRight);  }
@Test public void testSemiJoin() { assertThat( Enumerables.semiJoin(EMPS, DEPTS, new Function1<Emp, Integer>() { public Integer apply(Emp a0) { return a0.deptno; } }, new Function1<Dept, Integer>() { public Integer apply(Dept a0) { return a0.deptno; } }, Functions.<Integer>identityComparer()).toList().toString(), equalTo("[Emp(20, Theodore), Emp(20, Sebastian)]")); }