I want to have two loop variables of different types. Is there any way to make this work?
@Override public T get(int index) throws IndexOutOfBoundsException
You can't like this. Either you use multiple variables of the same type for(Object var1 = null, var2 = null; ...) or you extract the other variable and declare it before the for loop.
for(Object var1 = null, var2 = null; ...)