|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--agent.Agent
This class represents an agent on the map. An agent may be a User representing an emulated ipaq user, or it may be a wireless access point whose sole purpose is to help connect users. This class cannot be initiated it only defines methods and variables that will be used by specific types of Agents.
Field Summary | |
private java.awt.Point |
location
The current pixel location of this user. |
private java.lang.String |
name
The name of this agent. |
private util.Position |
position
The current gps Position of the agent. |
private int |
range
The wireless networking range of this agent. |
Constructor Summary | |
Agent(java.awt.Point l,
util.Position p,
int r)
This constructor initializes the agent with universal information |
|
Agent(java.lang.String n,
java.awt.Point l,
util.Position p,
int r)
This constructor initializes the agent with universal information |
Method Summary | |
java.awt.Point |
getLocation()
This method returns the current pixel location of the agent. |
java.lang.String |
getName()
This method returns the name of this agent. |
util.Position |
getPosition()
This method return the current gps position of the agent. |
int |
getRange()
This method returns the range of the agent. |
void |
setLocation(java.awt.Point l)
This method sets the pixel location of the agent. |
void |
setName(java.lang.String n)
This method sets the name of the agent. |
void |
setPosition(util.Position p)
This method sets the gps position of the agent. |
void |
setRange(int r)
This method sets the range of the agent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.awt.Point location
private util.Position position
private int range
private java.lang.String name
Constructor Detail |
public Agent(java.lang.String n, java.awt.Point l, util.Position p, int r)
n
- The name of the agent.l
- The starting pixel location of this agent on the map.p
- The starting gps position of this agent on the map.r
- The wireless network range of the agent.public Agent(java.awt.Point l, util.Position p, int r)
l
- The starting pixel location of this agent on the map.p
- The starting gps position of this agent on the map.r
- The wireless network range of the agent.Method Detail |
public java.lang.String getName()
public void setName(java.lang.String n)
n
- The name of this agent.public java.awt.Point getLocation()
public util.Position getPosition()
public int getRange()
public void setLocation(java.awt.Point l)
l
- The location of agent.public void setPosition(util.Position p)
p
- The position of agent.public void setRange(int r)
r
- The range in pixels.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |