io.sarl.lang.core
Class Address
All Superinterfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<T>
class Address
extends SRESpecificDataContainer
implements java.io.Serializable, java.lang.Comparable<T>, java.lang.Cloneable
This class describes all the addresses used by the space to identify its participants.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
core
Property Summary
Modifier and type Property and description
java.util.UUID iD
Replies the participant identifier associated to this address.
SpaceID spaceID
Replies the ID of the space related to this address.
SpaceID spaceId
Replies the ID of the space related to this address.
Deprecated for removal since 0.7: since 0.7, see getSpaceID() for replacement.
java.util.UUID uUID
Replies the participant identifier associated to this address.
Deprecated for removal since 0.12: since 0.12, see getID()
Constructor Summary
Constructor and description
new(SpaceID,UUID)
Create an address based on the specified identifier.
Action Summary
Modifier and type Action and description
Address clone
int compareTo(Address)
Compares this object with the specified object for order.
boolean equals(Address)
Test if this address and the given one are equal.
boolean equals(Object)
java.util.UUID getID
Replies the participant identifier associated to this address.
SpaceID getSpaceID
Replies the ID of the space related to this address.
SpaceID getSpaceId
Replies the ID of the space related to this address.
Deprecated for removal since 0.7: since 0.7, see getSpaceID() for replacement.
java.util.UUID getUUID
Replies the participant identifier associated to this address.
Deprecated for removal since 0.12: since 0.12, see getID()
int hashCode
java.lang.String toString
Property Details
iD
val iD : java.util.UUID
Replies the participant identifier associated to this address.

This property is an alias for the action: getID

Returns:
the participant identifier associated to this address.
Since:
0.12
spaceID
val spaceID : SpaceID
Replies the ID of the space related to this address.

This property is an alias for the action: getSpaceID

Returns:
the space ID.
Since:
0.7
spaceId
val spaceId : SpaceID
Replies the ID of the space related to this address.

This property is an alias for the action: getSpaceId

Returns:
the space ID.
Deprecated:
since 0.7, see getSpaceID() for replacement.
uUID
val uUID : java.util.UUID
Replies the participant identifier associated to this address.

This property is an alias for the action: getUUID

Returns:
the participant identifier associated to this address.
Deprecated:
since 0.12, see getID()
Constructor Details
new(SpaceID,UUID)
new(SpaceID,UUID)
Create an address based on the specified identifier.
Parameters:
spaceId - the identifier of the space related to this address.
participantId - is the identifier of the participant.
Action Details
clone
def clone : Address
compareTo(Address)
def compareTo(Address) : int
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure sgn(x.compareTo(y)) ==br -sgn(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception iff y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y)&gt;0 &amp;&amp; y.compareTo(z)&gt;0) implies x.compareTo(z)&gt;0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for all z.

It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."

In the foregoing description, the notation sgn(expression ) designates the mathematical signum function, which is defined to return one of -1, 0, or 1 according to whether the value of expression is negative, zero or positive.
Parameters:
address - is the address to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
equals(Address)
def equals(Address) : boolean
Test if this address and the given one are equal.
Parameters:
address - is the address to be compared.
Returns:
true if this address and the given one are equal, otherwise false
equals(Object)
def equals(Object) : boolean
getID
def getID : java.util.UUID
Replies the participant identifier associated to this address.
Returns:
the participant identifier associated to this address.
Since:
0.12
getSpaceID
def getSpaceID : SpaceID
Replies the ID of the space related to this address.
Returns:
the space ID.
Since:
0.7
getSpaceId
def getSpaceId : SpaceID
Replies the ID of the space related to this address.
Returns:
the space ID.
Deprecated:
since 0.7, see getSpaceID() for replacement.
getUUID
def getUUID : java.util.UUID
Replies the participant identifier associated to this address.
Returns:
the participant identifier associated to this address.
Deprecated:
since 0.12, see getID()
hashCode
def hashCode : int
toString
def toString : java.lang.String