- add some equals() methods where compareTo is used

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8820 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 60f34c788c
commit 212b57ecc6
  1. 8
      engine/src/core/com/jme3/collision/CollisionResult.java
  2. 8
      engine/src/terrain/com/jme3/terrain/geomipmap/picking/TerrainPickData.java

@ -107,6 +107,14 @@ public class CollisionResult implements Comparable<CollisionResult> {
return 0;
}
@Override
public boolean equals(Object obj) {
if(obj instanceof CollisionResult){
return ((CollisionResult)obj).compareTo(this) == 0;
}
return super.equals(obj);
}
public Vector3f getContactPoint() {
return contactPoint;
}

@ -68,4 +68,12 @@ public class TerrainPickData implements Comparable {
return 0;
}
@Override
public boolean equals(Object obj) {
if(obj instanceof TerrainPickData){
return ((TerrainPickData)obj).compareTo(this) == 0;
}
return super.equals(obj);
}
}

Loading…
Cancel
Save