Here you can find the source of getAll(Iterator> it)
public static void getAll(Iterator<?> it)
//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(); } }