Triangle implements Cloneable, Savable, Externalizable, ReadOnlyTriangle, Poolable { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof ReadOnlyTriangle)) { return false; } final ReadOnlyTriangle comp = (ReadOnlyTriangle) o; return _index == comp.getIndex() && _pointA.equals(comp.getA()) && _pointB.equals(comp.getB()) && _pointC.equals(comp.getC()); } Triangle();  Triangle(final ReadOnlyTriangle source);  Triangle(final ReadOnlyVector3 pointA, final ReadOnlyVector3 pointB, final ReadOnlyVector3 pointC);  Triangle(final ReadOnlyVector3 pointA, final ReadOnlyVector3 pointB, final ReadOnlyVector3 pointC,
    final int index); Triangle set(final ReadOnlyTriangle source); @Override int getIndex(); @Override ReadOnlyVector3 get(final int index); @Override ReadOnlyVector3 getA(); @Override ReadOnlyVector3 getB(); @Override ReadOnlyVector3 getC(); @Override ReadOnlyVector3 getNormal(); @Override ReadOnlyVector3 getCenter(); void setIndex(final int index); void setA(final ReadOnlyVector3 pointA); void setB(final ReadOnlyVector3 pointB); void setC(final ReadOnlyVector3 pointC); void set(final int index, final ReadOnlyVector3 point); static boolean isValid(final Triangle triangle); @Override double getArea(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object o); @Override Triangle clone(); @Override Class<? extends Triangle> getClassTag(); @Override void write(final OutputCapsule capsule); @Override void read(final InputCapsule capsule); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); final static Triangle fetchTempInstance(); final static void releaseTempInstance(final Triangle tri);  }
@Test public void testEquals() { final Triangle tri1 = new Triangle(); assertEquals(tri1, tri1); assertFalse(tri1.equals(null)); final Triangle tri2 = Triangle.fetchTempInstance(); tri2.set(tri1); assertEquals(tri1, tri2); assertNotSame(tri1, tri2); Triangle.releaseTempInstance(tri2); assertTrue(tri1.equals(new Triangle(Vector3.ZERO, Vector3.ZERO, Vector3.ZERO))); assertFalse(tri1.equals(new Triangle(Vector3.ZERO, Vector3.ZERO, Vector3.UNIT_X))); assertFalse(tri1.equals(new Triangle(Vector3.ZERO, Vector3.UNIT_X, Vector3.UNIT_X))); assertFalse(tri1.equals(new Triangle(Vector3.ZERO, Vector3.UNIT_X, Vector3.ZERO))); assertFalse(tri1.equals(new Triangle(Vector3.UNIT_X, Vector3.ZERO, Vector3.ZERO))); assertFalse(tri1.equals(new Triangle(Vector3.UNIT_X, Vector3.ZERO, Vector3.UNIT_X))); assertFalse(tri1.equals(new Triangle(Vector3.UNIT_X, Vector3.UNIT_X, Vector3.ZERO))); assertFalse(tri1.equals(new Triangle(Vector3.UNIT_X, Vector3.UNIT_X, Vector3.UNIT_X))); }