1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package Torello.HTML.Tools.Images;

import java.net.URL;
import java.util.Vector;

import Torello.Java.StrPrint;

class FromURLIterator 
{
    static Request build(final Iterable<URL> source)
    {
        final Vector<URL> temp = new Vector<>();
        int count = 0;

        for (final URL url : source)
        {
            count++;

            if (url == null) throw new NullPointerException(
                "The " + count + StrPrint.ordinalIndicator(count) + " element of " +
                "Iterable-Parameter 'source' is null"
            );

            temp.add(url);
        }

        return new Request(temp, count, null);
    }

}