code: public GeometryIndex getNextVertex(GeometryIndex index) {
  		if (index.hasChild()) {
  			return new GeometryIndex(index.getType(), index.getValue(), getNextVertex(index.getChild()));
  		} else {
  			return new GeometryIndex(GeometryIndexType.TYPE_VERTEX, index.getValue() + 1, null);
  		}
  	}
docs: Given a certain index, find the next vertex in line.
  
  @param index
  The index to start out from. Must point to either a vertex or and edge.
  @return Returns the next vertex index. Note that no geometry is given, and so no actual checking is done. It just
  returns the theoretical answer.