@Override
    public Iterator<Light> iterator() {
        return new Iterator<Light>() {

            int index = 0;

            @Override
            public boolean hasNext() {
                return index < size();
            }

            @Override
            public Light next() {
                if (!hasNext())
                    throw new NoSuchElementException();

                return list[index++];
            }

            @Override
            public void remove() {
                LightList.this.remove(--index);
            }
        };
    }
Returns an iterator that can be used to iterate over this LightList.

@return an iterator that can be used to iterate over this LightList.
jme3-core/src/main/java/com/jme3/light/LightList.java