public void addVertex( Vertex<T> v ) {
    int posNeighborVertex = getVerticesIndexFor( v );

    if ( posNeighborVertex != -1 ) {
      throw new IllegalArgumentException(
          "duplicate vertex " + v );
    }
    int posNewVertex = getFreeVertexPosition();
    vertices[posNewVertex] = v;
    this.numberOfVertices++;
  }