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.
|
Modifier | Constructor and Description |
---|---|
|
PhoneNumber()
Constructs an instance using the default key.
|
protected |
PhoneNumber(ElementKey<java.lang.String,? extends PhoneNumber> key)
Subclass constructor, allows subclasses to supply their own element key.
|
protected |
PhoneNumber(ElementKey<java.lang.String,? extends PhoneNumber> key,
Element source)
Constructs a new instance by doing a shallow copy of data from an existing
Element instance. |
|
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.
|
adapt, adapt, addElement, addElement, addElement, clear, createElement, createElement, eq, 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, narrow, removeAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeElement, removeElement, removeElement, removeElement, replaceElement, resolve, resolve, sameClassAs, setAttributeValue, setAttributeValue, setElement, setElement, setElement, setTextValue, toString, validate, 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()
protected PhoneNumber(ElementKey<java.lang.String,? extends PhoneNumber> key)
protected PhoneNumber(ElementKey<java.lang.String,? extends PhoneNumber> key, Element source)
Element
instance. Will use the given ElementKey
as the key
for the element. This constructor is used when adapting from one element
key to another. You cannot call this constructor directly, instead use
Element.createElement(ElementKey, Element)
.key
- The key to use for this element.source
- source elementpublic 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()