Module org.dyn4j
Package org.dyn4j.collision
Class AbstractCollisionPair<T extends CollisionBody<E>,E extends Fixture>
- Object
-
- AbstractCollisionPair<T,E>
-
- Type Parameters:
T
- theCollisionBody
typeE
- theFixture
type
- All Implemented Interfaces:
CollisionPair<T,E>
,Copyable<CollisionPair<T,E>>
- Direct Known Subclasses:
BasicCollisionPair
public abstract class AbstractCollisionPair<T extends CollisionBody<E>,E extends Fixture> extends Object implements CollisionPair<T,E>, Copyable<CollisionPair<T,E>>
Abstract implementation of theCollisionPair
interface.- Since:
- 4.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description AbstractCollisionPair()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
equals(CollisionPair<?,?> pairA, Object obj)
Returns true if the given pair and object are equal.static int
getHashCode(CollisionBody<?> body1, Fixture fixture1, CollisionBody<?> body2, Fixture fixture2)
Returns the hashcode for a collision pair.-
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface CollisionPair
getBody, getBody1, getBody2, getFixture, getFixture1, getFixture2, getOtherBody, getOtherFixture
-
-
-
-
Method Detail
-
getHashCode
public static int getHashCode(CollisionBody<?> body1, Fixture fixture1, CollisionBody<?> body2, Fixture fixture2)
Returns the hashcode for a collision pair.- Parameters:
body1
- the first bodyfixture1
- the first body's fixturebody2
- the second bodyfixture2
- the second body's fixture- Returns:
- int
-
equals
public static boolean equals(CollisionPair<?,?> pairA, Object obj)
Returns true if the given pair and object are equal.- Parameters:
pairA
- the first pairobj
- the other object- Returns:
- boolean
-
-