java.rmi.server

Class UID

public final class UID extends Object implements Serializable

Represents the unique identifier over time for the host which has generated it. It contains time (when created), counter (the number of the UID creation order) and virtual machine id components. The UID can also be constructed specifying a "well known" identifier in the for of short: this identifier defines the UID uniqueness alone.
Constructor Summary
UID()
Create the new UID that would have the described features of the uniqueness.
UID(short wellKnownId)
Create the new UID with the well known id (number).
Method Summary
booleanequals(Object other)
Compare this UID with another UID for equality (not equal to other types of objects).
inthashCode()
Get the hashCode of this UID.
static UIDread(DataInput in)
StringtoString()
Get the string representation of this UID.
voidwrite(DataOutput out)

Constructor Detail

UID

public UID()
Create the new UID that would have the described features of the uniqueness.

UID

public UID(short wellKnownId)
Create the new UID with the well known id (number). All UIDs, creates with the this constructor having the same parameter are equal to each other (regardless to the host and time where they were created.

Parameters: wellKnownId the well known UID.

Method Detail

equals

public boolean equals(Object other)
Compare this UID with another UID for equality (not equal to other types of objects).

hashCode

public int hashCode()
Get the hashCode of this UID.

read

public static UID read(DataInput in)

toString

public String toString()
Get the string representation of this UID.

Returns: a string, uniquely identifying this id.

write

public void write(DataOutput out)