public class PostalAddress extends Element
Modifier and Type | Class and Description |
---|---|
static class |
PostalAddress.Rel
Postal address type.
|
Modifier and Type | Field and Description |
---|---|
static ElementKey<java.lang.String,PostalAddress> |
KEY
The key for this element.
|
static AttributeKey<java.lang.String> |
LABEL
Simple string value used to name this address.
|
static AttributeKey<java.lang.Boolean> |
PRIMARY
Whether this is the primary postal address.
|
static AttributeKey<java.lang.String> |
REL
Postal address type.
|
Modifier | Constructor and Description |
---|---|
|
PostalAddress()
Constructs an instance using the default key.
|
protected |
PostalAddress(ElementKey<java.lang.String,? extends PostalAddress> key)
Subclass constructor, allows subclasses to supply their own element key.
|
protected |
PostalAddress(ElementKey<java.lang.String,? extends PostalAddress> key,
Element source)
Constructs a new instance by doing a shallow copy of data from an existing
Element instance. |
|
PostalAddress(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 address.
|
java.lang.Boolean |
getPrimary()
Returns the whether this is the primary postal address.
|
java.lang.String |
getRel()
Returns the postal address type.
|
java.lang.String |
getValue()
Returns the address string.
|
int |
hashCode() |
boolean |
hasLabel()
Returns whether it has the simple string value used to name this address.
|
boolean |
hasPrimary()
Returns whether it has the whether this is the primary postal address.
|
boolean |
hasRel()
Returns whether it has the postal address type.
|
boolean |
hasValue()
Returns whether it has the address string.
|
PostalAddress |
lock()
Locks this element.
|
static void |
registerMetadata(MetadataRegistry registry)
Registers the metadata for this element.
|
PostalAddress |
setLabel(java.lang.String label)
Sets the simple string value used to name this address.
|
PostalAddress |
setPrimary(java.lang.Boolean primary)
Sets the whether this is the primary postal address.
|
PostalAddress |
setRel(java.lang.String rel)
Sets the postal address type.
|
PostalAddress |
setValue(java.lang.String value)
Sets the address string.
|
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,PostalAddress> 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 PostalAddress()
protected PostalAddress(ElementKey<java.lang.String,? extends PostalAddress> key)
protected PostalAddress(ElementKey<java.lang.String,? extends PostalAddress> 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 PostalAddress(java.lang.String value)
value
- address string.public static void registerMetadata(MetadataRegistry registry)
public PostalAddress lock()
Element
public java.lang.String getLabel()
public PostalAddress setLabel(java.lang.String label)
label
- simple string value used to name this address or null
to resetpublic boolean hasLabel()
public java.lang.Boolean getPrimary()
public PostalAddress setPrimary(java.lang.Boolean primary)
primary
- whether this is the primary postal address or null
to resetpublic boolean hasPrimary()
public java.lang.String getRel()
public PostalAddress setRel(java.lang.String rel)
rel
- postal address type or null
to resetpublic boolean hasRel()
public java.lang.String getValue()
public PostalAddress setValue(java.lang.String value)
value
- address string or null
to resetpublic boolean hasValue()