package com.github.chrisblutz.trinity.utils;

import com.github.chrisblutz.trinity.lang.TyRuntime;
import com.github.chrisblutz.trinity.lang.types.TyArray;
import com.github.chrisblutz.trinity.natives.TrinityNatives;

import java.util.Arrays;


/**
 * @author Christopher Lutz
 */
public class ArrayUtils {
    
    public static boolean isSolid(TyArray array, TyRuntime runtime) {
        
        return TrinityNatives.toBoolean(array.tyInvoke("isSolid", runtime, null, null));
    }
    
    public static <T> T[] combine(T[] array, T[]... arrays) {
        
        int size = array.length;
        for (T[] other : arrays) {
            
            size += other.length;
        }
        
        T[] newArray = Arrays.copyOf(array, size);
        
        int i = array.length;
        for (T[] other : arrays) {
            
            System.arraycopy(other, 0, newArray, i, other.length);
            i += other.length;
        }
        
        return newArray;
    }
}

@@ -35,24 +35,75 @@
 ity.utils;%0A%0A
+import com.github.chrisblutz.trinity.lang.TyClass;%0A
 import com.g
@@ -557,13 +557,15 @@
 tic 
-%3CT%3E T
+TyClass
 %5B%5D c
@@ -572,16 +572,22 @@
 ombine(T
+yClass
 %5B%5D array
@@ -589,16 +589,22 @@
 array, T
+yClass
 %5B%5D... ar
@@ -659,32 +659,38 @@
 ;%0A        for (T
+yClass
 %5B%5D other : array
@@ -769,16 +769,22 @@
        T
+yClass
 %5B%5D newAr
@@ -848,32 +848,32 @@
 = array.length;%0A
-
         for (T%5B%5D
@@ -870,16 +870,22 @@
   for (T
+yClass
 %5B%5D other

Remove generics from ArrayUtils.combine