@Override
    public boolean hasNext() {
        if (main != null) {
            return true;
        }
        trim();
        return !path.isEmpty();
    }
Instantiates a new {@code SceneGraphIterator} instance that
starts iterating at the given main spatial.

@param main the main spatial to start iteration from
jme3-core/src/main/java/com/jme3/scene/SceneGraphIterator.java