public static < T > CloseableIterable < T > distinct ( final CloseableIterable < T > iterable ) { return wrap ( Iterables2 . distinct ( iterable ) , iterable ) ; }
If we can assume the closeable iterable is sorted return the distinct elements . This only works if the data provided is sorted .