// the copy to a new List is intentional as remove() operations will cause ConcurrentModificationException otherwise
return edgeStream.filter(e -> HasContainer.testAll(e, hasContainers)).collect(Collectors.<Edge>toList()).iterator();
}
private Iterator<? extends Vertex> vertices() {
final HasContainer indexedContainer = getIndexKey(Vertex.class);
final Stream<? extends Vertex> vertexStream = (null == indexedContainer) ?
TinkerHelper.getVertices((TinkerGraph)this.traversal.sideEffects().getGraph()).stream() :
TinkerHelper.queryVertexIndex((TinkerGraph)this.traversal.sideEffects().getGraph(), indexedContainer.key, indexedContainer.value).stream();
// the copy to a new List is intentional as remove() operations will cause ConcurrentModificationException otherwise