public class Address extends SRESpecificDataContainer implements Serializable, Comparable<Address>, Cloneable
Constructor and Description |
---|
Address(spaceId : SpaceID,
participantId : UUID)
Create an address based on the specified identifier.
|
Modifier and Type | Method and Description |
---|---|
Address |
clone() |
int |
compareTo(address : Address)
Compares this object with the specified object for order.
|
boolean |
equals(address : Address)
Test if this address and the given one are equal.
|
boolean |
equals(obj : Object) |
UUID |
getID()
Replies the participant identifier associated to this address.
|
SpaceID |
getSpaceId()
Deprecated.
since 0.7, see
Address.getSpaceID() for replacement. |
SpaceID |
getSpaceID()
Replies the ID of the space related to this address.
|
UUID |
getUUID()
Deprecated.
since 0.12, see
Address.getID() |
int |
hashCode() |
String |
toString() |
@Deprecated
@Pure
public def
getUUID() : UUID
Address.getID()
Address
@Pure
public def
getID() : UUID
Address
@Pure
public def
equals(address : Address) : boolean
Address
address
- is the address to be compared.true
if this address and the given one are equal,
otherwise false
@Pure
public def
compareTo(address : Address) : int
Address
The implementor must ensure sgn(x.compareTo(y)) ==
-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)>0 && y.compareTo(z)>0)
implies
x.compareTo(z)>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.
compareTo
in interface Comparable<Address>
address
- is the address to be compared.@Pure
public def
getSpaceID() : SpaceID
Address
@Pure
@Deprecated
public def
getSpaceId() : SpaceID
Address.getSpaceID()
for replacement.Address
Copyright © 2021 the original authors or authors.