|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.sc.ants.Message
The Message object is sent back and forth between the agents and includes all the information they send to each other.
Field Summary | |
(package private) double |
distance
If the message is a "bid" then the distance is like the bid amount or utility the receiver expects. |
(package private) long |
expiresAt
Time at which the message is supposed to expire |
(package private) Map |
map
Agents can give each other maps of what they believe is out there. |
(package private) java.lang.String |
performative
The performative of the message. |
(package private) long |
receivedAt
Time at which the message was received, to be set by recipient if it wants. |
(package private) int |
receiver
The ID of the agent who is meant to receive this message. |
(package private) int |
sender
ID of the sender |
(package private) long |
sentAt
Time at which the message was sent |
Constructor Summary | |
Message(java.lang.String p,
int s,
int r,
Map m)
A constructor with a lot of arguments |
|
Message(java.lang.String p,
int s,
int r,
Map m,
double d)
Build a messeage with a map and a distance(bid). |
Method Summary | |
double |
getDistance()
Get the value of distance. |
long |
getExpiresAt()
Get the value of expiresAt. |
Map |
getMap()
Get the value of map. |
java.lang.String |
getPerformative()
Get the value of performative. |
long |
getReceivedAt()
Get the value of receivedAt. |
int |
getReceiver()
Get the value of receiver. |
int |
getSender()
Get the value of sender. |
long |
getSentAt()
Get the value of sentAt. |
void |
setDistance(double v)
Set the value of distance. |
void |
setExpiresAt(long v)
Set the value of expiresAt. |
void |
setMap(Map v)
Set the value of map. |
void |
setPerformative(java.lang.String v)
Set the value of performative. |
void |
setReceivedAt(long v)
Set the value of receivedAt. |
void |
setReceiver(int v)
Set the value of receiver. |
void |
setSender(int v)
Set the value of sender. |
void |
setSentAt(long v)
Set the value of sentAt. |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.lang.String performative
Map map
int sender
int receiver
long sentAt
long expiresAt
long receivedAt
double distance
Constructor Detail |
public Message(java.lang.String p, int s, int r, Map m)
public Message(java.lang.String p, int s, int r, Map m, double d)
Method Detail |
public java.lang.String getPerformative()
public void setPerformative(java.lang.String v)
v
- Value to assign to performative.public Map getMap()
public void setMap(Map v)
v
- Value to assign to map.public int getSender()
public void setSender(int v)
v
- Value to assign to sender.public int getReceiver()
public void setReceiver(int v)
v
- Value to assign to receiver.public long getSentAt()
public void setSentAt(long v)
v
- Value to assign to sentAt.public long getExpiresAt()
public void setExpiresAt(long v)
v
- Value to assign to expiresAt.public long getReceivedAt()
public void setReceivedAt(long v)
v
- Value to assign to receivedAt.public double getDistance()
public void setDistance(double v)
v
- Value to assign to distance.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |