cat.sig
Class Profile

java.lang.Object
  extended bycat.sig.Profile
All Implemented Interfaces:
java.io.Serializable

public class Profile
extends java.lang.Object
implements java.io.Serializable

This class represents the profile for an Agent. A profile contains information about an agent that the agent is willing to share.

See Also:
Serialized Form

Field Summary
private  boolean available
          True if the agent is available for communication.
private  java.lang.String displayname
          The agent's nickname/psuedoname.
private  java.lang.String location
          The agent's gps location.
 
Constructor Summary
Profile()
          This constructor initializes the profile with no information
Profile(java.lang.String displayname, java.lang.String location, boolean available)
          This constructor initializes the profile with the given information.
 
Method Summary
 boolean equals(Profile a)
          returns true if the agents have the same id.
 java.lang.String getLocation()
          Returns the agent's location (gps nmea format).
 java.lang.String getName()
          Returns the agent's nickname.
 boolean isAvailable()
          Returns whether the agent is available for communication.
 void setAvailable(boolean s)
          Set's whether the agent is available for communication.
 void setLocation(java.lang.String s)
          Set's the agent's location (gps nmea format).
 void setName(java.lang.String s)
          Set's the agent's nickname.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

displayname

private java.lang.String displayname
The agent's nickname/psuedoname.


location

private java.lang.String location
The agent's gps location.


available

private boolean available
True if the agent is available for communication.

Constructor Detail

Profile

public Profile()
This constructor initializes the profile with no information


Profile

public Profile(java.lang.String displayname,
               java.lang.String location,
               boolean available)
This constructor initializes the profile with the given information.

Parameters:
displayname - The nick name of the agent.
location - The port this agent using for communicating
Method Detail

getName

public java.lang.String getName()
Returns the agent's nickname.

Returns:
String The name.

isAvailable

public boolean isAvailable()
Returns whether the agent is available for communication.

Returns:
boolean rue if available.

getLocation

public java.lang.String getLocation()
Returns the agent's location (gps nmea format).

Returns:
String The gps name location.

setLocation

public void setLocation(java.lang.String s)
Set's the agent's location (gps nmea format).

Parameters:
s - The gps name location.

setName

public void setName(java.lang.String s)
Set's the agent's nickname.

Parameters:
s - The name.

setAvailable

public void setAvailable(boolean s)
Set's whether the agent is available for communication.

Parameters:
s - True if available.

equals

public boolean equals(Profile a)
returns true if the agents have the same id.

Parameters:
a -
Returns:

toString

public java.lang.String toString()