|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.ants.felixgm.trmsim_wsn.network.Service
public class Service
This class models a service offered in a P2P, Ad-hoc or Wireless Sensor Network, or even an agent in a multi-agent system.
Currently it is defined only by its name or identifier, but it can be extended to be defined by more characteristics such as the prize, the quality or the cost, for instance
| Field Summary | |
|---|---|
protected java.lang.String |
id
Services's identifier |
| Constructor Summary | |
|---|---|
Service(java.lang.String id)
Class Service constructor |
|
| Method Summary | |
|---|---|
Service |
clone()
This method creates and returns a copy of this service |
boolean |
equals(Service service)
Indicates if two services are equal or not, according to their identifiers |
java.lang.String |
id()
Returns the service id |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String id
| Constructor Detail |
|---|
public Service(java.lang.String id)
id - Services's identifier| Method Detail |
|---|
public boolean equals(Service service)
service - Service to be compared
public Service clone()
clone in class java.lang.Objectpublic java.lang.String id()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||