a-foundation/src/main/java/com/ajjpj/afoundation/collection/ACollectionHelper.java
public static <T> Collection<T> asJavaUtilCollection(Iterable<T> c) {
        if(c instanceof Collection) {
            return (Collection<T>) c;
        }

        return asJavaUtilCollection(c.iterator());
    }
public static <T> Collection<T> asJavaUtilCollection(Iterable<T> c) {
        if(c instanceof Collection) {
            return (Collection<T>) c;
        }

        return asJavaUtilCollection(c.iterator());
    }
Returns a <code>Collection</code> with the exact same elements as an <code>Iterable</code>, copying only if the parameter is not a collection.