public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Vertex vertex = (Vertex) o;
return Objects.equals(getId(), vertex.getId()) &&
getState() == vertex.getState() &&
Objects.equals(getVertices(), vertex.getVertices());
}
getClass() != o.getClass()