@Override
    public Iterator<CollisionResult> iterator() {
        if (results == null) {
            List<CollisionResult> dumbCompiler = Collections.emptyList();
            return dumbCompiler.iterator();
        }

        if (!sorted) {
            Collections.sort(results);
            sorted = true;
        }

        return results.iterator();
    }
Iterator for iterating over the collision results.

@return the iterator
jme3-core/src/main/java/com/jme3/collision/CollisionResults.java