Rectangle3 implements Cloneable, Savable, Externalizable, ReadOnlyRectangle3, Poolable { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof ReadOnlyRectangle3)) { return false; } final ReadOnlyRectangle3 comp = (ReadOnlyRectangle3) o; return _a.equals(comp.getA()) && _b.equals(comp.getB()) && _c.equals(comp.getC()); } Rectangle3();  Rectangle3(final ReadOnlyRectangle3 source);  Rectangle3(final ReadOnlyVector3 a, final ReadOnlyVector3 b, final ReadOnlyVector3 c); Rectangle3 set(final ReadOnlyRectangle3 source); @Override ReadOnlyVector3 getA(); void setA(final ReadOnlyVector3 a); @Override ReadOnlyVector3 getB(); void setB(final ReadOnlyVector3 b); @Override ReadOnlyVector3 getC(); void setC(final ReadOnlyVector3 c); @Override Vector3 random(Vector3 result); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object o); @Override Rectangle3 clone(); @Override void write(final OutputCapsule capsule); @Override void read(final InputCapsule capsule); @Override Class<? extends Rectangle3> getClassTag(); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); final static Rectangle3 fetchTempInstance(); final static void releaseTempInstance(final Rectangle3 rectangle);  }
@Test public void testEquals() { final Rectangle3 rect1 = new Rectangle3(); assertEquals(rect1, rect1); assertFalse(rect1.equals(null)); final Rectangle3 rect2 = Rectangle3.fetchTempInstance(); rect2.set(rect1); assertEquals(rect1, rect2); assertNotSame(rect1, rect2); Rectangle3.releaseTempInstance(rect2); assertTrue(rect1.equals(new Rectangle3(Vector3.ZERO, Vector3.ZERO, Vector3.ZERO))); assertFalse(rect1.equals(new Rectangle3(Vector3.ZERO, Vector3.ZERO, Vector3.UNIT_X))); assertFalse(rect1.equals(new Rectangle3(Vector3.ZERO, Vector3.UNIT_X, Vector3.UNIT_X))); assertFalse(rect1.equals(new Rectangle3(Vector3.ZERO, Vector3.UNIT_X, Vector3.ZERO))); assertFalse(rect1.equals(new Rectangle3(Vector3.UNIT_X, Vector3.ZERO, Vector3.ZERO))); assertFalse(rect1.equals(new Rectangle3(Vector3.UNIT_X, Vector3.ZERO, Vector3.UNIT_X))); assertFalse(rect1.equals(new Rectangle3(Vector3.UNIT_X, Vector3.UNIT_X, Vector3.ZERO))); assertFalse(rect1.equals(new Rectangle3(Vector3.UNIT_X, Vector3.UNIT_X, Vector3.UNIT_X))); }