ala http://reactivex.io/RxJava/1.x/javadoc/rx/Observable.html#distinct-rx.functions.Func1-
stream = Stream.of("a1", "b1", "c2", "c3");
distinct = StreamUtils.distinct(stream, str -> str.charAt(1));
distinct.forEach(x -> System.out.println(x));
prints: