private static void reverseArray(Object[] array, int firstId, int lastId) {
        lastId--;
        while (firstId < lastId) {
            Object o = array[firstId];
            array[firstId] = array[lastId];
            array[lastId] = o;
            firstId++;
            lastId--;
        }        
    }
Reverse an array from firstId to lastId

@param array the array to reverse
@param firstId the index where to start to reverse
@param lastId the index where to stop to reverse
jme3-core/src/main/java/com/jme3/util/ListSort.java