@Test(expected = NullPointerException.class) public void shouldThrowANullPointerExceptionIfIterablePassedToAsListIsNull() throws Exception { asList(null); }
public static <T> List<T> asList(Iterator<? extends T> iterator) { List<T> list = new ArrayList<T>(); while (iterator.hasNext()) { list.add(iterator.next()); } return list; }
Iterators { public static <T> List<T> asList(Iterator<? extends T> iterator) { List<T> list = new ArrayList<T>(); while (iterator.hasNext()) { list.add(iterator.next()); } return list; } }
Iterators { public static <T> List<T> asList(Iterator<? extends T> iterator) { List<T> list = new ArrayList<T>(); while (iterator.hasNext()) { list.add(iterator.next()); } return list; } private  Iterators(); }
Iterators { public static <T> List<T> asList(Iterator<? extends T> iterator) { List<T> list = new ArrayList<T>(); while (iterator.hasNext()) { list.add(iterator.next()); } return list; } private  Iterators(); static Iterator<T> emptyIterator(); static Iterable<T> asIterable(Iterator<T> iterator); static List<T> asList(Iterator<? extends T> iterator); static Set<T> asSet(Iterator<? extends T> iterator); static Multiset<T> asMultiset(Iterator<? extends T> iterator); static UnaryFunction<? super Iterable<? extends T>, Iterator<? extends T>> fromIterableToIterator(); static UnaryFunction<? super Iterable<? extends T>, Iterator<? extends T>> fromIterableToIterator(Class<T> ofKlass); static UnaryFunction<Iterable<? extends T>, Iterator<? extends T>> fromIterableToIteratorKeepingNull(); static UnaryFunction<Iterable<? extends T>, Iterator<? extends T>> fromIterableToIteratorKeepingNull(Class<T> ofKlass); }
Iterators { public static <T> List<T> asList(Iterator<? extends T> iterator) { List<T> list = new ArrayList<T>(); while (iterator.hasNext()) { list.add(iterator.next()); } return list; } private  Iterators(); static Iterator<T> emptyIterator(); static Iterable<T> asIterable(Iterator<T> iterator); static List<T> asList(Iterator<? extends T> iterator); static Set<T> asSet(Iterator<? extends T> iterator); static Multiset<T> asMultiset(Iterator<? extends T> iterator); static UnaryFunction<? super Iterable<? extends T>, Iterator<? extends T>> fromIterableToIterator(); static UnaryFunction<? super Iterable<? extends T>, Iterator<? extends T>> fromIterableToIterator(Class<T> ofKlass); static UnaryFunction<Iterable<? extends T>, Iterator<? extends T>> fromIterableToIteratorKeepingNull(); static UnaryFunction<Iterable<? extends T>, Iterator<? extends T>> fromIterableToIteratorKeepingNull(Class<T> ofKlass);  }