public class Uid extends UriProperty
Defines a globally unique identifier for this vCard.
Code sample
VCard vcard = new VCard();
Uid uid = new Uid("urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519");
vcard.setUid(uid);
//or, generate a random UID
uid = Uid.random();
vcard.setUid(uid);
Property name: UID
Supported versions: 2.1, 3.0, 4.0
valuegroup, parameters| Constructor and Description |
|---|
Uid(String uid)
Creates a UID property.
|
Uid(Uid original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Uid |
copy()
Creates a copy of this property object.
|
static Uid |
random()
Creates a UID property that contains a random UUID URI.
|
_validate, equals, getValue, hashCode, setValue, toStringValuesaddParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, isSupportedBy, removeParameter, setGroup, setParameter, setParameters, toString, validatepublic static Uid random()
public Uid copy()
VCardPropertyCreates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
VCardProperty.VCardProperty(VCardProperty) super constructor to ensure that
the group name and parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException will be thrown when an attempt is
made to copy the property (such as in the VCard
class's copy constructor).
copy in class VCardPropertyCopyright © 2012–2023 Michael Angstadt. All rights reserved.