The list of methods to do Iterator from are organized into topic(s).
Iterable
createIntegerIterator(int start)
create Integer Iterator
return new Iterable<Integer>() {
@Override
public Iterator<Integer> iterator() {
return new Iterator<Integer>() {
private int counter = start;
@Override
public boolean hasNext() {
return counter < Integer.MAX_VALUE;
...
void
getAll(Iterator> it) Gets all the elements from an iterator and does nothing with them.
while (it.hasNext())
it.next();
String
getCommaSeparatedValue(Iterator it) get Comma Separated Value
boolean first = true;
StringBuffer result = new StringBuffer();
while (it.hasNext()) {
if (first) {
first = false;
} else {
result.append(",");
result.append(it.next());
return result.toString();
ImageTypeSpecifier
getDestinationType(ImageReadParam param, Iterator imageTypes) Gets the destination image type.
if (imageTypes == null || !imageTypes.hasNext()) {
throw new IllegalArgumentException("imageTypes null or empty!");
ImageTypeSpecifier imageType = null;
if (param != null) {
imageType = param.getDestinationType();
if (imageType == null) {
...
Iterator
getEmptyIterator()
Returns an empty iterator
return new Iterator<T>() {
@Override
public boolean hasNext() {
return false;
@Override
public T next() {
if (!hasNext())
...
int
getEnumeratedObjectCount(Iterator objects) Gets the enumerated object count.
int count = 0;
while (objects != null && objects.hasNext()) {
@SuppressWarnings("unused")
Object obj = objects.next();
count++;
return count;