All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bmuschko.gradle.docker.utils.CollectionUtil.groovy Maven / Gradle / Ivy

There is a newer version: 6.7.0
Show newest version
package com.bmuschko.gradle.docker.utils

import java.lang.reflect.Array

final class CollectionUtil {
    private CollectionUtil() { }

    static Object[] toArray(List list) {
        if (list == null) {
            return new Object[0]
        }

        Class clazz = list[0].getClass()
        list.toArray(Array.newInstance(clazz, 0))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy