- Object
-
- AbstractCollisionPair<T>
-
- Type Parameters:
T
- the object type
- All Implemented Interfaces:
CollisionPair<T>
,Copyable<CollisionPair<T>>
- Direct Known Subclasses:
BasicCollisionPair
public abstract class AbstractCollisionPair<T> extends Object implements CollisionPair<T>, Copyable<CollisionPair<T>>
Abstract implementation of theCollisionPair
interface.- Since:
- 4.0.0
- Version:
- 4.1.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(Object item1, Object item2)
Returns the hashcode for a pair of objects assuming order doesn't matter.static int
getHashCode(CollisionBody<?> body1, Fixture fixture1, CollisionBody<?> body2, Fixture fixture2)
Returns the hashcode for a collision pair.-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface CollisionPair
getFirst, getSecond
-
-
-
-
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
-
getHashCode
public static int getHashCode(Object item1, Object item2)
Returns the hashcode for a pair of objects assuming order doesn't matter.- Parameters:
item1
- the first objectitem2
- the second object- Returns:
- int
- Since:
- 4.1.0
-
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
-
-