public class Iterators2 extends Object
| Constructor and Description |
|---|
Iterators2() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterator<T> |
distinct(Iterator<T> iterator)
If we can assume the iterator is sorted, return the distinct elements.
|
static <T> Iterator<T> |
drainingIterator(Queue<T> queue)
Generates an iterator that will drain a queue by consistently polling the latest item.
|
Copyright © 2014 Calrissian. All rights reserved.