| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public boolean equals(Object o) { |
| 77 | if (this == o) return true; |
| 78 | if (!(o instanceof Cuboid)) return false; |
| 79 | |
| 80 | Cuboid rect = (Cuboid) o; |
| 81 | |
| 82 | if (Float.compare(rect.h, h) != 0) return false; |
| 83 | if (Float.compare(rect.w, w) != 0) return false; |
| 84 | if (Float.compare(rect.x, x) != 0) return false; |
| 85 | if (Float.compare(rect.y, y) != 0) return false; |
| 86 | |
| 87 | if (Float.compare(rect.z, d) != 0) return false; |
| 88 | return Float.compare(rect.d, z) == 0; |
| 89 | |
| 90 | } |
| 91 | |
| 92 | @Override |
| 93 | public int hashCode() { |