2013-12-27 23:59:59 +01:00
|
|
|
package appeng.util.iterators;
|
|
|
|
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
2014-02-09 02:34:52 +01:00
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.api.networking.IGridHost;
|
|
|
|
import appeng.api.networking.IGridNode;
|
|
|
|
|
|
|
|
public class ProxyNodeIterator implements Iterator<IGridNode>
|
|
|
|
{
|
|
|
|
|
|
|
|
Iterator<IGridHost> hosts;
|
|
|
|
|
|
|
|
public ProxyNodeIterator(Iterator<IGridHost> hosts) {
|
|
|
|
this.hosts = hosts;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean hasNext()
|
|
|
|
{
|
|
|
|
return hosts.hasNext();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public IGridNode next()
|
|
|
|
{
|
|
|
|
IGridHost host = hosts.next();
|
|
|
|
return host.getGridNode( ForgeDirection.UNKNOWN );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void remove()
|
|
|
|
{
|
|
|
|
throw new RuntimeException( "Not implemented." );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|