public class ParticipantId
extends java.lang.Object
Constructor and Description |
---|
ParticipantId()
Creates a new random id.
|
ParticipantId(byte[] bytes)
Creates an ID from a byte representation.
|
ParticipantId(java.lang.String sid)
Parses an id from its string form generated with
toString() . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
protected java.util.UUID |
getUUID() |
int |
hashCode() |
byte[] |
toByteArray()
Returns the bytes representing the id.
|
java.lang.String |
toString() |
public ParticipantId()
public ParticipantId(byte[] bytes)
bytes
- byte representation of the id.public ParticipantId(java.lang.String sid)
toString()
.sid
- string representationjava.lang.IllegalArgumentException
- invalid string formatpublic java.lang.String toString()
toString
in class java.lang.Object
public byte[] toByteArray()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
protected java.util.UUID getUUID()