/**
* Gets an Iterator for the Iterable or psuedo-Iterable (array) {@code source}.
*/
@SuppressWarnings("unchecked")
protected Iterator<Object> getSourceIterator(S source) {
return source.getClass().isArray() ? new ArrayIterator(source)
: ((Iterable<Object>) source).iterator();
}