Class skydata::internal::message::SKAID¶
ClassList > skydata > internal > message > SKAID
Inherits the following classes: Serializable, Comparable< SKAID >, Cloneable
Public Functions¶
Type | Name |
---|---|
SKAID (String name, String address) |
|
SKAID () |
|
Object | clone () |
int | compareTo (SKAID o) |
boolean | equals (Object o) |
final String | getAddress () |
final String | getName () |
final int | getNbMigration () |
int | hashCode () |
void | nextMigration () |
final void | setName (String n) |
final AID | toAID () |
String | toString () |
void | update (String a) |
void | update (String a, int n) |
void | updateAddress (String a) |
void | updateMigration (int m) |
Protected Attributes¶
Type | Name |
---|---|
String | address |
String | name |
int | nbMigration |
Detailed Description¶
Represent the identity of an agent.
The identity of an agent contains three informations : * the name * the current address * the number of completed migration
Public Functions Documentation¶
function SKAID [1/2]¶
inline skydata::internal::message::SKAID::SKAID (
String name,
String address
)
Construct an identity with a name and an address
Parameters:
name
: the name of the agentaddress
: the address of the agent
function SKAID [2/2]¶
inline skydata::internal::message::SKAID::SKAID ()
Construct an empty identity
function clone¶
inline Object skydata::internal::message::SKAID::clone ()
Copy an object without exception
function compareTo¶
inline int skydata::internal::message::SKAID::compareTo (
SKAID o
)
Compare two identities
This comparison is equivalent to compare the name of these identities
Parameters:
o
: the second identity to test
Returns:
the same value that the comparison of two string
function equals¶
inline boolean skydata::internal::message::SKAID::equals (
Object o
)
Verify if two identities are equal.
Two identities is considered as equal if and only if their names are equal.
Parameters:
o
: the second identity to test
Returns:
true if the identities are equal
function getAddress¶
inline final String skydata::internal::message::SKAID::getAddress ()
Get the address of the agent
Returns:
the address
function getName¶
inline final String skydata::internal::message::SKAID::getName ()
Get the name of the agent
Returns:
the name
function getNbMigration¶
inline final int skydata::internal::message::SKAID::getNbMigration ()
Get the number of completed migration
Returns:
the number
function hashCode¶
inline int skydata::internal::message::SKAID::hashCode ()
Get the hash of an identity
This hash is simply the hash of its name
Returns:
the hash
function nextMigration¶
inline void skydata::internal::message::SKAID::nextMigration ()
Switch to the next migration.
Basically, it increment the counter of number of completed migration
function setName¶
inline final void skydata::internal::message::SKAID::setName (
String n
)
Set the name of the agent
Parameters:
n
: the new name
function toAID¶
inline final AID skydata::internal::message::SKAID::toAID ()
Convert this identity to Jade Identity
Returns:
the Jade Identity
function toString¶
inline String skydata::internal::message::SKAID::toString ()
Get the string representation of an identity.
The string representation is : (NAME #NB : ADDRESS)
Returns:
the string representation
function update [1/2]¶
inline void skydata::internal::message::SKAID::update (
String a
)
Update the identity after a migration
Basically, it increments the number of completed migration and set the new address
Parameters:
a
: the new address
function update [2/2]¶
inline void skydata::internal::message::SKAID::update (
String a,
int n
)
Set in one call the number of completed migration and the address
Parameters:
a
: the new addressn
: the new number
function updateAddress¶
inline void skydata::internal::message::SKAID::updateAddress (
String a
)
Set the current address
Parameters:
a
: the new address
function updateMigration¶
inline void skydata::internal::message::SKAID::updateMigration (
int m
)
Set the number of completed migration
Parameters:
m
: the new number
Protected Attributes Documentation¶
variable address¶
String skydata.internal.message.SKAID.address;
The current address of the agent
variable name¶
String skydata.internal.message.SKAID.name;
The name of the agent
variable nbMigration¶
int skydata.internal.message.SKAID.nbMigration;
The number of completed migration
The documentation for this class was generated from the following file /home/maxime/Desktop/skd_proto_v2/skd/src/main/java/skydata/internal/message/SKAID.java