public class Email extends Element
Modifier and Type | Class and Description |
---|---|
static class |
Email.Rel
Email type.
|
Modifier and Type | Field and Description |
---|---|
static AttributeKey<java.lang.String> |
ADDRESS
Email address.
|
static AttributeKey<java.lang.String> |
DISPLAY_NAME
DisplayName.
|
static ElementKey<java.lang.Void,Email> |
KEY
The key for this element.
|
static AttributeKey<java.lang.String> |
LABEL
Label.
|
static AttributeKey<java.lang.Boolean> |
PRIMARY
Whether this is the primary email address.
|
static AttributeKey<java.lang.String> |
REL
Email type.
|
Modifier | Constructor and Description |
---|---|
|
Email()
Constructs an instance using the default key.
|
protected |
Email(ElementKey<?,? extends Email> key)
Subclass constructor, allows subclasses to supply their own element key.
|
protected |
Email(ElementKey<?,? extends Email> key,
Element source)
Constructs a new instance by doing a shallow copy of data from an existing
Element instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAddress()
Returns the email address.
|
java.lang.String |
getDisplayName()
Returns the displayName.
|
java.lang.String |
getLabel()
Returns the label.
|
java.lang.Boolean |
getPrimary()
Returns the whether this is the primary email address.
|
java.lang.String |
getRel()
Returns the email type.
|
boolean |
hasAddress()
Returns whether it has the email address.
|
boolean |
hasDisplayName()
Returns whether it has the displayName.
|
int |
hashCode() |
boolean |
hasLabel()
Returns whether it has the label.
|
boolean |
hasPrimary()
Returns whether it has the whether this is the primary email address.
|
boolean |
hasRel()
Returns whether it has the email type.
|
Email |
lock()
Locks this element.
|
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
|
Email |
setAddress(java.lang.String address)
Sets the email address.
|
Email |
setDisplayName(java.lang.String displayName)
Sets the displayName.
|
Email |
setLabel(java.lang.String label)
Sets the label.
|
Email |
setPrimary(java.lang.Boolean primary)
Sets the whether this is the primary email address.
|
Email |
setRel(java.lang.String rel)
Sets the email type.
|
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.Void,Email> KEY
public static final AttributeKey<java.lang.String> ADDRESS
public static final AttributeKey<java.lang.String> DISPLAY_NAME
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 Email()
protected Email(ElementKey<?,? extends Email> key)
protected Email(ElementKey<?,? extends Email> 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 static void registerMetadata(MetadataRegistry registry)
public Email lock()
Element
public java.lang.String getAddress()
public Email setAddress(java.lang.String address)
address
- email address or null
to resetpublic boolean hasAddress()
public java.lang.String getDisplayName()
public Email setDisplayName(java.lang.String displayName)
displayName
- displayName or null
to resetpublic boolean hasDisplayName()
public java.lang.String getLabel()
public Email setLabel(java.lang.String label)
label
- label or null
to resetpublic boolean hasLabel()
public java.lang.Boolean getPrimary()
public Email setPrimary(java.lang.Boolean primary)
primary
- whether this is the primary email address or null
to
resetpublic boolean hasPrimary()
public java.lang.String getRel()
public Email setRel(java.lang.String rel)
rel
- email type or null
to resetpublic boolean hasRel()