@Override
            public boolean hasNext() {
                return index < size();
            }
Sorts the elements in the list according to their Comparator.
jme3-core/src/main/java/com/jme3/renderer/queue/GeometryList.java