MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / equals

Method equals

src/main/java/field/utility/Cuboid.java:75–90  ·  view source on GitHub ↗
(Object o)

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

compareMethod · 0.45

Tested by

no test coverage detected