@SuppressWarnings("unchecked")
    public void sort() {
        if (size > 1) {
            // sort the spatial list using the comparator
            if (listSort.getLength() != size) {
                listSort.allocateStack(size);
            }
            listSort.sort(geometries,comparator);
        }
    }
Sorts the elements in the list according to their Comparator.
jme3-core/src/main/java/com/jme3/renderer/queue/GeometryList.java