@SupportedVersions(value=V3_0) public class SortString extends TextProperty
Defines the string that should be used when an application sorts this vCard in some way.
This property is not supported in 4.0. Instead, use the
StructuredName.setSortAs(String) and/or Organization.setSortAs(java.lang.String)
methods when creating version 4.0 vCards.
Code sample (3.0)
VCard vcard = new VCard();
StructuredName n = new StructuredName();
n.setFamily("d'Armour");
n.setGiven("Miles");
vcard.setStructuredName(n);
SortString sortString = new SortString("Armour");
vcard.setSortString(sortString);
Code sample (4.0)
VCard vcard = new VCard();
StructuredName n = new StructuredName();
n.setFamily("d'Armour");
n.setGiven("Miles");
n.setSortAs("Armour");
vcard.setStructuredName(n);
Property name: SORT-STRING
Supported versions: 3.0
valuegroup, parameters| Constructor and Description |
|---|
SortString(SortString original)
Copy constructor.
|
SortString(String sortString)
Creates a sort-string property.
|
| Modifier and Type | Method and Description |
|---|---|
SortString |
copy()
Creates a copy of this property object.
|
_validate, equals, getValue, hashCode, setValue, toStringValuesaddParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, isSupportedBy, removeParameter, setGroup, setParameter, setParameters, toString, validatepublic SortString(String sortString)
sortString - the sort stringpublic SortString(SortString original)
original - the property to make a copy ofpublic SortString 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.