- All Known Implementing Classes:
ContactCard.Parsed,ContactCard.Raw
A model class to represent and build the vcard of a contact
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA parsed representation of the vcardstatic final recordA raw representation of the vcard -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringgetPhoneType(ezvcard.property.Telephone entry) getPhoneValue(ezvcard.property.Telephone entry) private static booleanisValidPhoneNumber(ezvcard.property.Telephone entry) joinPhoneNumbers(List<Jid> first, List<Jid> second) static ContactCardParses a vcard If the vCard dependency wasn't included, or a parsing error occurs, a raw representation is returnedstatic ContactCardCreates a new vcardstatic ContactCardCreates a new vcardstatic ContactCardofNullable(String vcard) toVcard()
-
Method Details
-
ofNullable
-
of
Parses a vcard If the vCard dependency wasn't included, or a parsing error occurs, a raw representation is returned- Parameters:
vcard- the non-null vcard to parse- Returns:
- a non-null vcard
-
of
Creates a new vcard- Parameters:
name- the nullable name of the contactphoneNumber- the non-null phone number of the contact- Returns:
- a vcard
-
of
Creates a new vcard- Parameters:
name- the nullable name of the contactphoneNumber- the non-null phone number of the contactbusinessName- the nullable business name of the contact- Returns:
- a vcard
-
isValidPhoneNumber
private static boolean isValidPhoneNumber(ezvcard.property.Telephone entry) -
getPhoneType
-
getPhoneValue
-
joinPhoneNumbers
-
toVcard
String toVcard()
-