public static <E> Bag<E> copyOf(Iterator<? extends E> i)
	{
		return new ImmutableBag<E>(new ArrayBag<E>(i));
	}
public static < E > Bag < E > copyOf ( Iterator < ? extends E > i ) { return new ImmutableBag < E > ( new ArrayBag < E > ( i ) ) ; }
Creates a new {@code ImmutableBag} from the given {@code Iterator}.

@param <E> the type of the {@code Bag}'s elements.
@param i the source {@code Iterator}.

@return the created {@code ImmutableBag}.

@throws NullPointerException if {@code i} is {@code null}.