pacworld
Class Package
java.lang.Object
pacworld.Package
public class Package
- extends java.lang.Object
A package for the package delivery world.
Constructor Summary |
Package(int i,
int destId,
int destX,
int destY)
Create a package by specifying its id and destination. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Package
public Package(int i,
int destId,
int destX,
int destY)
- Create a package by specifying its id and destination.
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
getAgent
public PacAgentRep getAgent()
- Return the agent that is holding the package. Return null if no agent is
holding it.
- Returns:
getDestId
public int getDestId()
getDestX
public int getDestX()
getDestY
public int getDestY()
getId
public int getId()
getX
public int getX()
getY
public int getY()
setAgent
public void setAgent(PacAgentRep agt)
setX
public void setX(int newX)
setY
public void setY(int newY)