public class BluetoothUuid
extends java.lang.Object
BluetoothUuid
class represents the UUID of a service or attribute.
UUIDs may be created from a string representing a 128-bit UUID or from an integer containing a 16-bit UUID.
A string representation of a UUID may be retrieved by calling the toString()
method of the object.
The equals(Object)
method may be used in order to check if a UUID is equal to an other.
Constructor and Description |
---|
BluetoothUuid(int value)
Creates a UUID from an integer.
|
BluetoothUuid(java.lang.String string)
Creates a UUID from a string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns whether this UUID is equal to the given object.
|
java.lang.String |
toString()
Returns a string representation of this UUID.
|
public BluetoothUuid(java.lang.String string)
string
- a string representing a 128-bit UUID.java.lang.IllegalArgumentException
- if the given string does not represent a 128-bit UUID.public BluetoothUuid(int value)
value
- an integer representing a 16-bit UUID.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object