// This software is released into the Public Domain. See copying.txt for details. package org.openstreetmap.osmosis.core.container.v0_6; import org.openstreetmap.osmosis.core.domain.v0_6.Bound; import org.openstreetmap.osmosis.core.lifecycle.ReleasableIterator; /** * Wraps a set of bound items into bound containers. * * @author Brett Henderson */ public class BoundContainerIterator implements ReleasableIterator<BoundContainer> { private ReleasableIterator<Bound> source; /** * Creates a new instance. * * @param source The input source. */ public BoundContainerIterator(ReleasableIterator<Bound> source) { this.source = source; } /** * {@inheritDoc} */ @Override public boolean hasNext() { return source.hasNext(); } /** * {@inheritDoc} */ @Override public BoundContainer next() { return new BoundContainer(source.next()); } /** * {@inheritDoc} */ @Override public void remove() { source.remove(); } /** * {@inheritDoc} */ @Override public void close() { source.close(); } }