Class PropertyIterator

java.lang.Object
net.okapia.osid.torrefacto.streams.PropertyIterator
All Implemented Interfaces:
Iterable<Property>, Iterator<Property>, Spliterator<Property>

public final class PropertyIterator extends Object implements Iterator<Property>, Iterable<Property>, Spliterator<Property>

Iterates through a PropertyList. This class implements Iterator, Iterable, and Spliterator. It also provides a Stream interface.

This class is designed to work with OsidStreams to preserve the exception chain.

    OsidStreams.go(() ->
        PropertyIterator.stream(propertyList)
                        .forEach(property -> handle(property)));