Triangle implements Cloneable, Savable, Externalizable, ReadOnlyTriangle, Poolable { @Override public int hashCode() { int result = 17; result += 31 * result + _pointA.hashCode(); result += 31 * result + _pointB.hashCode(); result += 31 * result + _pointC.hashCode(); result += 31 * result + _index; return result; } 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 testSimpleHash() { final Triangle tri1 = new Triangle(Vector3.ZERO, Vector3.UNIT_Y, Vector3.NEG_ONE, 1); final Triangle tri2 = new Triangle(Vector3.ZERO, Vector3.UNIT_Y, Vector3.NEG_ONE, 1); final Triangle tri3 = new Triangle(Vector3.ZERO, Vector3.UNIT_Z, Vector3.NEG_ONE, 2); assertTrue(tri1.hashCode() == tri2.hashCode()); assertTrue(tri1.hashCode() != tri3.hashCode()); }