@Override
public GiraphVertex next() {
try {
if (this.nextVertex != null) {
final GiraphVertex temp = this.nextVertex;
this.nextVertex = null;
return temp;
} else {
while (!this.readers.isEmpty()) {
if (this.readers.peek().nextVertex())
return new GiraphVertex(((GiraphComputeVertex) this.readers.peek().getCurrentVertex()).getBaseVertex(), this.graph);
else
this.readers.remove();
}
}
throw FastNoSuchElementException.instance();