- add some equals() methods where compareTo is used
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8820 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
60f34c788c
commit
212b57ecc6
@ -107,6 +107,14 @@ public class CollisionResult implements Comparable<CollisionResult> {
|
|||||||
return 0;
|
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() {
|
public Vector3f getContactPoint() {
|
||||||
return contactPoint;
|
return contactPoint;
|
||||||
}
|
}
|
||||||
|
@ -68,4 +68,12 @@ public class TerrainPickData implements Comparable {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if(obj instanceof TerrainPickData){
|
||||||
|
return ((TerrainPickData)obj).compareTo(this) == 0;
|
||||||
|
}
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user