LineSegment3 extends Line3Base implements ReadOnlyLineSegment3, Poolable { @Override public int hashCode() { int result = 17; result += 31 * result + _origin.hashCode(); result += 31 * result + _direction.hashCode(); final long ex = Double.doubleToLongBits(_extent); result += 31 * result + (int) (ex ^ ex >>> 32); return result; } LineSegment3();  LineSegment3(final ReadOnlyLineSegment3 source);  LineSegment3(final ReadOnlyVector3 origin, final ReadOnlyVector3 direction, final double extent);  LineSegment3(final ReadOnlyVector3 start, final ReadOnlyVector3 end); LineSegment3 set(final ReadOnlyLineSegment3 source); @Override double getExtent(); void setExtent(final double extent); Vector3 getPositiveEnd(final Vector3 store); Vector3 getNegativeEnd(final Vector3 store); @Override double distanceSquared(final ReadOnlyVector3 point, final Vector3 store); Vector3 random(final Vector3 store); static boolean isValid(final ReadOnlyLineSegment3 segment); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); @Override LineSegment3 clone(); @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 LineSegment3 fetchTempInstance(); final static void releaseTempInstance(final LineSegment3 segment);  }
@Test public void testSimpleHash() { final LineSegment3 seg1 = new LineSegment3(Vector3.ZERO, Vector3.UNIT_Y, 2); final LineSegment3 seg2 = new LineSegment3(Vector3.ZERO, Vector3.UNIT_Y, 2); final LineSegment3 seg3 = new LineSegment3(Vector3.ZERO, Vector3.UNIT_Y, 4); assertTrue(seg1.hashCode() == seg2.hashCode()); assertTrue(seg1.hashCode() != seg3.hashCode()); }