initial commit
[applet-bots.git] / src / appletbots / CollisionException.java
blob06a8271ede4e10e842fdf9a6b6b47aeb879dc86d
1 /*
2 * Copyright (c) 2002 Erik Rasmussen - All Rights Reserverd
3 */
4 package appletbots;
6 /**
7 * This exception is thrown when two objects collide
9 * @author Erik Rasmussen
11 public class CollisionException extends Exception
13 /**
14 * The collider. The object that is colliding with the collidee.
16 private WorldObject collider;
17 /**
18 * The collidee. The object that the collider is colliding with.
20 private WorldObject collidee;
22 /**
23 * Creates a new CollisionException with the given collider and collidee
25 * @param collider The collider. The object that is colliding with the collidee.
26 * @param collidee The collidee. The object that the collider is colliding with.
28 public CollisionException(final WorldObject collider, final WorldObject collidee)
30 super();
31 this.collider = collider;
32 this.collidee = collidee;
35 /**
36 * Creates a new CollisionException with the given error message
38 * @param message The error message
40 public CollisionException(final String message)
42 super(message);
45 /**
46 * Creates a new CollisionException
48 public CollisionException()
50 super();
53 /**
54 * Returns the collider. The object that is colliding with the collidee.
56 * @return The collider. The object that is colliding with the collidee.
58 public WorldObject getCollider()
60 return collider;
63 /**
64 * Returns the collidee. The object that the collider is colliding with.
66 * @return The collidee. The object that the collider is colliding with.
68 public WorldObject getCollidee()
70 return collidee;