public static <T> T[] addFirst(final T[] array, final T element, final Class<T> clazz) {
        if (null == array) {
            final T[] singleElementArray = (T[]) Array.newInstance(clazz, 1);
            singleElementArray[0] = element;
            return singleElementArray;
        } else {
            return ArrayUtils.addFirst(array, element);
        }
    }
Adds the element argument to the start of the supplied array argument, but if the array is null then return the
element as a new array with just that item in it.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/CollectionUtil.java