Class MessageId
- java.lang.Object
-
- org.drasyl.peer.connection.message.MessageId
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
static boolean
isValidMessageId(CharSequence id)
Checks ifid
is a valid identifier.static MessageId
randomMessageId()
Static factory to retrieve a randomly generatedMessageId
.String
toString()
-
-
-
Constructor Detail
-
MessageId
public MessageId(String id)
-
-
Method Detail
-
randomMessageId
public static MessageId randomMessageId()
Static factory to retrieve a randomly generatedMessageId
.- Returns:
- A randomly generated
MessageId
-
isValidMessageId
public static boolean isValidMessageId(CharSequence id)
Checks ifid
is a valid identifier.- Parameters:
id
- string to be validated- Returns:
true
if valid. Otherwisefalse
-
-