agent
Class Agent

java.lang.Object
  |
  +--agent.Agent
Direct Known Subclasses:
AccessPoint, User

public abstract class Agent
extends java.lang.Object

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

location

private java.awt.Point location
The current pixel location of this user.


position

private util.Position position
The current gps Position of the agent.


range

private int range
The wireless networking range of this agent.


name

private java.lang.String name
The name of this agent.

Constructor Detail

Agent

public Agent(java.lang.String n,
             java.awt.Point l,
             util.Position p,
             int r)
This constructor initializes the agent with universal information

Parameters:
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.

Agent

public Agent(java.awt.Point l,
             util.Position p,
             int r)
This constructor initializes the agent with universal information

Parameters:
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

getName

public java.lang.String getName()
This method returns the name of this agent.

Returns:
String The name of this agent.

setName

public void setName(java.lang.String n)
This method sets the name of the agent.

Parameters:
n - The name of this agent.

getLocation

public java.awt.Point getLocation()
This method returns the current pixel location of the agent.

Returns:
Point The current location.

getPosition

public util.Position getPosition()
This method return the current gps position of the agent.

Returns:
Position The current position.

getRange

public int getRange()
This method returns the range of the agent.

Returns:
int The range in pixels.

setLocation

public void setLocation(java.awt.Point l)
This method sets the pixel location of the agent.

Parameters:
l - The location of agent.

setPosition

public void setPosition(util.Position p)
This method sets the gps position of the agent.

Parameters:
p - The position of agent.

setRange

public void setRange(int r)
This method sets the range of the agent.

Parameters:
r - The range in pixels.