@Override
	public Vertex[] toArray() {
		Vertex[] theVertices = new Vertex[this.size()];
		int i = 0, cnt = 0;
		int done = this.size();
		while (cnt < done) {
			if (vertices[i] != null) {
				theVertices[cnt++] = vertices[i];
			}
			i++;
		}
		return theVertices;
	}
Return the elements of this VertexSet as an Vertex[].
Ghidra/Framework/Generic/src/main/java/ghidra/util/graph/VertexSet.java