Java Iterator from getAll(Iterator it)

Here you can find the source of getAll(Iterator it)

Description

Gets all the elements from an iterator and does nothing with them.

License

Open Source License

Declaration

public static void getAll(Iterator<?> it) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Iterator;

public class Main {
    /**//from  w  ww  . ja  va2  s . co  m
     * Gets all the elements from an iterator and does nothing with them.
     */
    public static void getAll(Iterator<?> it) {
        while (it.hasNext())
            it.next();
    }
}

Related

  1. createIntegerIterator(int start)
  2. createIterable(final Iterator src)
  3. get(Iterator iterator, int position)
  4. getAt(Iterator it, int pos)
  5. getCommaSeparatedValue(Iterator it)
  6. getDestinationType(ImageReadParam param, Iterator imageTypes)
  7. getEmptyIterator()