public class Note extends TextProperty implements HasAltId
Defines a free-form text field that contains miscellaneous information.
Code sample
VCard vcard = new VCard();
Note note = new Note("This is a\nnote property.");
vcard.addNote(note);
Property name: NOTE
Supported versions: 2.1, 3.0, 4.0
valuegroup, parameters| Constructor and Description |
|---|
Note(Note original)
Copy constructor.
|
Note(String note)
Creates a note property.
|
| Modifier and Type | Method and Description |
|---|---|
Note |
copy()
Creates a copy of this property object.
|
String |
getAltId()
Gets the property's ALTID parameter.
|
String |
getLanguage()
Gets the language that the property value is written in.
|
List<Pid> |
getPids()
Gets the list that stores this property's PID (property ID) parameter
values.
|
Integer |
getPref()
Gets this property's preference value.
|
String |
getType()
Gets the TYPE parameter.
|
void |
setAltId(String altId)
Sets the property's ALTID parameter.
|
void |
setLanguage(String language)
Sets the language that the property value is written in.
|
void |
setPref(Integer pref)
Sets this property's preference value.
|
void |
setType(String type)
Sets the TYPE parameter.
|
_validate, equals, getValue, hashCode, setValue, toStringValuesaddParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, isSupportedBy, removeParameter, setGroup, setParameter, setParameters, toString, validatepublic List<Pid> getPids()
VCardPropertyGets the list that stores this property's PID (property ID) parameter values.
PIDs can exist on any property where multiple instances are allowed (such
as Email or Address, but not StructuredName
because only 1 instance of this property is allowed per vCard).
When used in conjunction with the ClientPidMap property, it
allows an individual property instance to be uniquely identifiable. This
feature is made use of when two different versions of the same vCard have
to be merged together (called "synchronizing").
Supported versions: 4.0
public Integer getPref()
VCardPropertyGets this property's preference value. The lower this number is, the more "preferred" the property instance is compared with other properties of the same type. If a property doesn't have a preference value, then it is considered the least preferred.
In the vCard below, the Address on the second row is the most
preferred because it has the lowest PREF value.
ADR;TYPE=work;PREF=2:;;1600 Amphitheatre Parkway;Mountain View;CA;94043 ADR;TYPE=work;PREF=1:;;One Microsoft Way;Redmond;WA;98052 ADR;TYPE=home:;;123 Maple St;Hometown;KS;12345
Supported versions: 4.0
public void setPref(Integer pref)
VCardPropertySets this property's preference value. The lower this number is, the more "preferred" the property instance is compared with other properties of the same type. If a property doesn't have a preference value, then it is considered the least preferred.
In the vCard below, the Address on the second row is the most
preferred because it has the lowest PREF value.
ADR;TYPE=work;PREF=2:;;1600 Amphitheatre Parkway;Mountain View;CA;94043 ADR;TYPE=work;PREF=1:;;One Microsoft Way;Redmond;WA;98052 ADR;TYPE=home:;;123 Maple St;Hometown;KS;12345
Supported versions: 4.0
pref - the preference value or null to removepublic String getAltId()
HasAltId
Supported versions: 4.0
getAltId in interface HasAltIdVCardParameters.getAltId()public void setAltId(String altId)
HasAltId
Supported versions: 4.0
setAltId in interface HasAltIdaltId - the ALTID or null to removeVCardParameters.setAltId(java.lang.String)public String getType()
Supported versions: 4.0
public void setType(String type)
Supported versions: 4.0
type - the TYPE value (this should be either "work" or "home") or
null to removepublic String getLanguage()
VCardPropertypublic void setLanguage(String language)
VCardPropertylanguage - the language or null to removepublic Note 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.