class ACollectionHelper {

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

        return asJavaUtilCollection(c.iterator());
    }

}