A check if the this vertex is equal to other by its given id.
other
bool equalsById(Vertex other) => id == other.id;