public class PhoneNumber extends Element
Modifier and Type | Class and Description |
---|---|
static class |
PhoneNumber.Rel
Programmatic value that identifies the type of phone number.
|
Modifier and Type | Field and Description |
---|---|
static ElementKey<java.lang.String,PhoneNumber> |
KEY
The key for this element.
|
static AttributeKey<java.lang.String> |
LABEL
Simple string value used to name this phone number.
|
static AttributeKey<java.lang.Boolean> |
PRIMARY
Whether this is the primary phone number.
|
static AttributeKey<java.lang.String> |
REL
Programmatic value that identifies the type of phone number.
|
Constructor and Description |
---|
PhoneNumber()
Constructs an instance using the default key.
|
PhoneNumber(java.lang.String value)
Constructs a new instance with the given value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getLabel()
Returns the simple string value used to name this phone number.
|
java.lang.Boolean |
getPrimary()
Returns the whether this is the primary phone number.
|
java.lang.String |
getRel()
Returns the programmatic value that identifies the type of phone number.
|
java.lang.String |
getValue()
Returns the human-readable phone number.
|
int |
hashCode() |
boolean |
hasLabel()
Returns whether it has the simple string value used to name this phone
number.
|
boolean |
hasPrimary()
Returns whether it has the whether this is the primary phone number.
|
boolean |
hasRel()
Returns whether it has the programmatic value that identifies the type of
phone number.
|
boolean |
hasValue()
Returns whether it has the human-readable phone number.
|
PhoneNumber |
lock()
Locks this element.
|
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
|
PhoneNumber |
setLabel(java.lang.String label)
Sets the simple string value used to name this phone number.
|
PhoneNumber |
setPrimary(java.lang.Boolean primary)
Sets the whether this is the primary phone number.
|
PhoneNumber |
setRel(java.lang.String rel)
Sets the programmatic value that identifies the type of phone number.
|
PhoneNumber |
setValue(java.lang.String value)
Sets the human-readable phone number.
|
addElement, addElement, addElement, clear, createElement, createElement, getAttributeCount, getAttributeIterator, getAttributeIterator, getAttributeValue, getAttributeValue, getDefaultKey, getElement, getElement, getElementCount, getElementId, getElementIterator, getElementIterator, getElementKey, getElements, getElements, getElementSet, getElementSet, getElementValue, getElementValue, getTextValue, getTextValue, hasAttribute, hasAttribute, hasElement, hasElement, hasTextValue, isLocked, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, visit
public static final ElementKey<java.lang.String,PhoneNumber> KEY
public static final AttributeKey<java.lang.String> LABEL
public static final AttributeKey<java.lang.Boolean> PRIMARY
public static final AttributeKey<java.lang.String> REL
public PhoneNumber()
public PhoneNumber(java.lang.String value)
value
- human-readable phone number.public static void registerMetadata(MetadataRegistry registry)
public PhoneNumber lock()
Element
public java.lang.String getLabel()
public PhoneNumber setLabel(java.lang.String label)
label
- simple string value used to name this phone number or null
to resetpublic boolean hasLabel()
public java.lang.Boolean getPrimary()
public PhoneNumber setPrimary(java.lang.Boolean primary)
primary
- whether this is the primary phone number or null
to
resetpublic boolean hasPrimary()
public java.lang.String getRel()
public PhoneNumber setRel(java.lang.String rel)
rel
- programmatic value that identifies the type of phone number or
null
to resetpublic boolean hasRel()
public java.lang.String getValue()
public PhoneNumber setValue(java.lang.String value)
value
- human-readable phone number or null
to resetpublic boolean hasValue()