@Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (getClass() != obj.getClass()) { return false; } final Vertex castObj = (Vertex) obj; return index == castObj.index && smooth == castObj.smooth && point.equals(castObj.point); }