public final class MicroElement extends AbstractMicroNodeWithChildren implements IMicroElement
IMicroElement interface.| Constructor and Description |
|---|
MicroElement(String sTagName) |
MicroElement(String sNamespaceURI,
String sTagName) |
| Modifier and Type | Method and Description |
|---|---|
ICommonsOrderedSet<String> |
getAllAttributeNames()
Get a set of all attribute names.
|
ICommonsList<? extends IMicroAttribute> |
getAllAttributeObjs()
Get a list of all attributes.
|
ICommonsOrderedSet<IMicroQName> |
getAllAttributeQNames()
Get a set of all attribute names.
|
ICommonsList<String> |
getAllAttributeValues()
Get a set of all attribute values.
|
ICommonsList<IMicroElement> |
getAllChildElements()
Get a list of all direct child elements.
|
ICommonsList<IMicroElement> |
getAllChildElements(String sTagName)
Get a list of all direct child elements having the specified tag name.
|
ICommonsList<IMicroElement> |
getAllChildElements(String sNamespaceURI,
String sLocalName)
Get a list of all direct child elements having the specified namespace and
the specified tag name.
|
ICommonsList<IMicroElement> |
getAllChildElementsRecursive()
Recursively get all child elements.
|
ICommonsOrderedMap<IMicroQName,String> |
getAllQAttributes()
Get a map of all fully qualified attribute names and values.
|
int |
getAttributeCount() |
Iterator<? extends IMicroAttribute> |
getAttributeIterator()
Get an iterator over all attributes.
|
MicroAttribute |
getAttributeObj(IMicroQName aQName)
Get the attribute object with the specified qualified name.
|
MicroAttribute |
getAttributeObj(String sAttrName)
Get the attribute object with the specified name.
|
MicroAttribute |
getAttributeObj(String sNamespaceURI,
String sAttrName)
Get the attribute object with the specified namespace URI and local name.
|
String |
getAttributeValue(IMicroQName aAttrName)
Get the attribute value of the given attribute name.
|
String |
getAttributeValue(String sAttrName)
Get the attribute value of the given attribute name.
|
String |
getAttributeValue(String sNamespaceURI,
String sAttrName)
Get the attribute value of the given attribute name.
|
<DSTTYPE> DSTTYPE |
getAttributeValueWithConversion(IMicroQName aAttrName,
Class<DSTTYPE> aDstClass)
Get the attribute value of the given attribute name.
|
<DSTTYPE> DSTTYPE |
getAttributeValueWithConversion(String sAttrName,
Class<DSTTYPE> aDstClass)
Get the attribute value of the given attribute name.
|
<DSTTYPE> DSTTYPE |
getAttributeValueWithConversion(String sNamespaceURI,
String sAttrName,
Class<DSTTYPE> aDstClass)
Get the attribute value of the given attribute name.
|
int |
getChildElementCount() |
IMicroElement |
getClone() |
IMicroElement |
getFirstChildElement()
Get the first child element of this element.
|
IMicroElement |
getFirstChildElement(String sTagName)
Get the first child element with the given tag name.
|
IMicroElement |
getFirstChildElement(String sNamespaceURI,
String sLocalName)
Get the first child element with the given tag name and the given
namespace.
|
String |
getLocalName()
Get the local name of the element.
|
String |
getNamespaceURI()
Get the namespace URI of this element
|
String |
getNodeName() |
String |
getTagName()
Get the name of the tag.
|
EMicroNodeType |
getType() |
boolean |
hasAttribute(IMicroQName aAttrName)
Check if this element has an attribute with the specified name.
|
boolean |
hasAttribute(String sAttrName)
Check if this element has an attribute with the specified name.
|
boolean |
hasAttribute(String sNamespaceURI,
String sAttrName)
Check if this element has an attribute with the specified name.
|
boolean |
hasAttributes() |
boolean |
hasChildElements()
Check if this element has at least one child element.
|
boolean |
hasChildElements(String sTagName)
Check if this element has at least one child element with the specified tag
name.
|
boolean |
hasChildElements(String sNamespaceURI,
String sLocalName)
Check if this element has at least one child element with the specified
namespace URI and tag name.
|
boolean |
hasNamespaceURI()
Check if this element has a specified namespace URI.
|
boolean |
hasNamespaceURI(String sNamespaceURI)
Check if this element has the specified namespace URI.
|
boolean |
hasNoAttributes() |
boolean |
hasNoNamespaceURI()
Check if this element has no namespace URI.
|
boolean |
isEqualContent(IMicroNode o)
As instances of this class may not implement equals/hashCode we need a way
to determine, if 2 nodes are equal by content.
|
EChange |
removeAllAttributes()
Remove all attributes from this element
|
EChange |
removeAttribute(IMicroQName aAttrName)
Remove the attribute with the given name.
|
EChange |
removeAttribute(String sAttrName)
Remove the attribute with the given name.
|
EChange |
removeAttribute(String sNamespaceURI,
String sAttrName)
Remove the attribute with the given name.
|
IMicroElement |
setAttribute(IMicroQName aAttrName,
boolean bAttrValue)
Set an attribute value of this element.
|
MicroElement |
setAttribute(IMicroQName aAttrName,
IHasAttributeValue aAttrValueProvider)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(IMicroQName aAttrName,
int nAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(IMicroQName aAttrName,
long nAttrValue)
Set an attribute value of this element.
|
MicroElement |
setAttribute(IMicroQName aAttrName,
String sAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(String sAttrName,
boolean bAttrValue)
Set an attribute value of this element.
|
MicroElement |
setAttribute(String sAttrName,
IHasAttributeValue aAttrValueProvider)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(String sAttrName,
int nAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(String sAttrName,
long nAttrValue)
Set an attribute value of this element.
|
MicroElement |
setAttribute(String sAttrName,
String sAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(String sNamespaceURI,
String sAttrName,
boolean bAttrValue)
Set an attribute value of this element.
|
MicroElement |
setAttribute(String sNamespaceURI,
String sAttrName,
IHasAttributeValue aAttrValueProvider)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(String sNamespaceURI,
String sAttrName,
int nAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttribute(String sNamespaceURI,
String sAttrName,
long nAttrValue)
Set an attribute value of this element.
|
MicroElement |
setAttribute(String sNamespaceURI,
String sAttrName,
String sAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttributeWithConversion(IMicroQName aAttrName,
Object aAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttributeWithConversion(String sAttrName,
Object aAttrValue)
Set an attribute value of this element.
|
IMicroElement |
setAttributeWithConversion(String sNamespaceURI,
String sAttrName,
Object aAttrValue)
Set an attribute value of this element.
|
EChange |
setNamespaceURI(String sNamespaceURI)
Set a new namespace URI for this element.
|
String |
toString() |
getAllChildren, getAllChildrenRecursive, getChildAtIndex, getChildCount, getFirstChild, getLastChild, getTextContent, getTextContentWithConversion, hasChildren, onAppendChild, onInsertAfter, onInsertAtIndex, onInsertBefore, onRemoveAllChildren, onRemoveChild, onRemoveChildAtIndexappendCDATA, appendCDATA, appendCDATAWithConversion, appendChild, appendComment, appendComment, appendCommentWithConversion, appendContainer, appendElement, appendElement, appendEntityReference, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendProcessingInstruction, appendText, appendText, appendTextWithConversion, detachFromParent, getAllEventTargets, getAllEventTargets, getNextSibling, getParent, getParentElementWithName, getParentElementWithName, getPreviousSibling, hasParent, insertAfter, insertAtIndex, insertBefore, isCDATA, isComment, isContainer, isDocument, isDocumentType, isElement, isEntityReference, isProcessingInstruction, isText, onEvent, registerEventTarget, removeAllChildren, removeChild, removeChildAtIndex, replaceChild, unregisterEventTargetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTextContent, getTextContentTrimmed, getTextContentWithConversionappendCDATA, appendCDATA, appendCDATA, appendCDATAWithConversion, appendChild, appendComment, appendComment, appendComment, appendCommentWithConversion, appendContainer, appendElement, appendElement, appendEntityReference, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendProcessingInstruction, appendText, appendText, appendText, appendTextWithConversion, detachFromParent, getAllChildren, getAllChildrenRecursive, getAllEventTargets, getAllEventTargets, getFirstChild, getLastChild, getNextSibling, getNodeValue, getParent, getParentElementWithName, getParentElementWithName, getPreviousSibling, hasChildren, hasParent, insertAfter, insertAtIndex, insertBefore, isCDATA, isComment, isContainer, isDocument, isDocumentType, isElement, isEntityReference, isProcessingInstruction, isText, registerEventTarget, removeAllChildren, removeChild, removeChildAtIndex, replaceChild, unregisterEventTargetgetChildAtIndexgetChildCount, hasNoChildren@Nonnull public EMicroNodeType getType()
getType in interface IMicroNodenull.@Nonnull @Nonempty public String getNodeName()
getNodeName in interface IMicroNodepublic boolean hasAttributes()
hasAttributes in interface IMicroElementtrue if this element has at least one attribute,
false otherwisepublic boolean hasNoAttributes()
hasNoAttributes in interface IMicroElementtrue if this element has no attribute,
false if at least one attribute is present.@Nonnegative public int getAttributeCount()
getAttributeCount in interface IMicroElement@Nullable @ReturnsMutableCopy public ICommonsList<? extends IMicroAttribute> getAllAttributeObjs()
IMicroElementnull if
IMicroElement.hasAttributes() returns true.getAllAttributeObjs in interface IMicroElementnull.@Nonnull public Iterator<? extends IMicroAttribute> getAttributeIterator()
IMicroElementgetAttributeIterator in interface IMicroElementnull.@Nullable @ReturnsMutableCopy public ICommonsOrderedMap<IMicroQName,String> getAllQAttributes()
IMicroElementnull if IMicroElement.hasAttributes() returns
true.getAllQAttributes in interface IMicroElementnull.@Nullable @ReturnsMutableCopy public ICommonsOrderedSet<String> getAllAttributeNames()
IMicroElementnull if
IMicroElement.hasAttributes() returns true.getAllAttributeNames in interface IMicroElementnull.@Nullable @ReturnsMutableCopy public ICommonsOrderedSet<IMicroQName> getAllAttributeQNames()
IMicroElementnull if
IMicroElement.hasAttributes() returns true.getAllAttributeQNames in interface IMicroElementnull.@Nullable @ReturnsMutableCopy public ICommonsList<String> getAllAttributeValues()
IMicroElementnull
if IMicroElement.hasAttributes() returns true.getAllAttributeValues in interface IMicroElementnull.@Nullable public MicroAttribute getAttributeObj(@Nullable String sAttrName)
IMicroElementgetAttributeObj in interface IMicroElementsAttrName - The attribute locale name to query. May be null.null of no such attribute object exists.@Nullable public MicroAttribute getAttributeObj(@Nullable String sNamespaceURI, @Nullable String sAttrName)
IMicroElementgetAttributeObj in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - The attribute locale name to query. May be null.null of no such attribute object exists.@Nullable public MicroAttribute getAttributeObj(@Nullable IMicroQName aQName)
IMicroElementgetAttributeObj in interface IMicroElementaQName - The qualified attribute name to check. May be null.null of no such attribute object exists.@Nullable public String getAttributeValue(@Nullable String sAttrName)
IMicroElementnull is returned.getAttributeValue in interface IMicroElementsAttrName - The attribute name to retrieve the value of.null.@Nullable public String getAttributeValue(@Nullable String sNamespaceURI, @Nullable String sAttrName)
IMicroElementnull is returned.getAttributeValue in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - The attribute name to retrieve the value of.null.@Nullable public String getAttributeValue(@Nullable IMicroQName aAttrName)
IMicroElementnull is returned.getAttributeValue in interface IMicroElementaAttrName - The qualified attribute name to retrieve the value of. May be
null.null.@Nullable public <DSTTYPE> DSTTYPE getAttributeValueWithConversion(@Nullable String sAttrName, @Nonnull Class<DSTTYPE> aDstClass)
IMicroElementnull is returned. The attribute value is
converted via the TypeConverter to
the desired destination class. If no such attribute is present,
null is returned.getAttributeValueWithConversion in interface IMicroElementDSTTYPE - Destination typesAttrName - The attribute name to retrieve the value of.aDstClass - The destination class.null.@Nullable public <DSTTYPE> DSTTYPE getAttributeValueWithConversion(@Nullable String sNamespaceURI, @Nullable String sAttrName, @Nonnull Class<DSTTYPE> aDstClass)
IMicroElementnull is returned. The attribute value is
converted via the TypeConverter to
the desired destination class. If no such attribute is present,
null is returned.getAttributeValueWithConversion in interface IMicroElementDSTTYPE - Destination typesNamespaceURI - Namespace URI to use. May be null.sAttrName - The attribute name to retrieve the value of.aDstClass - The destination class.null.@Nullable public <DSTTYPE> DSTTYPE getAttributeValueWithConversion(@Nullable IMicroQName aAttrName, @Nonnull Class<DSTTYPE> aDstClass)
IMicroElementnull is returned. The attribute value is
converted via the TypeConverter to
the desired destination class. If no such attribute is present,
null is returned.getAttributeValueWithConversion in interface IMicroElementDSTTYPE - Destination typeaAttrName - The attribute qualified name to retrieve the value of.aDstClass - The destination class.null.public boolean hasAttribute(@Nullable String sAttrName)
IMicroElementhasAttribute in interface IMicroElementsAttrName - The attribute name to check.true if such an attribute is present,
false otherwisepublic boolean hasAttribute(@Nullable String sNamespaceURI, @Nullable String sAttrName)
IMicroElementhasAttribute in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - The attribute name to check.true if such an attribute is present,
false otherwisepublic boolean hasAttribute(@Nullable IMicroQName aAttrName)
IMicroElementhasAttribute in interface IMicroElementaAttrName - The qualified attribute name to check. May be null.true if such an attribute is present,
false otherwise@Nonnull public EChange removeAttribute(@Nullable String sAttrName)
IMicroElementremoveAttribute in interface IMicroElementsAttrName - The name of the attribute to be removed. May be null.EChange.CHANGED if the attribute was removed,
EChange.UNCHANGED if no such attribute exists at this
element.@Nonnull public EChange removeAttribute(@Nullable String sNamespaceURI, @Nullable String sAttrName)
IMicroElementremoveAttribute in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - The name of the attribute to be removed. May be null.EChange.CHANGED if the attribute was removed,
EChange.UNCHANGED if no such attribute exists at this
element.@Nonnull public EChange removeAttribute(@Nullable IMicroQName aAttrName)
IMicroElementremoveAttribute in interface IMicroElementaAttrName - The qualified name of the attribute to be removed. May be
null.EChange.CHANGED if the attribute was removed,
EChange.UNCHANGED if no such attribute exists at this
element.@Nonnull public MicroElement setAttribute(@Nonnull @Nonempty String sAttrName, @Nullable String sAttrValue)
IMicroElementsetAttribute in interface IMicroElementsAttrName - Name of the attribute. May neither be null nor empty.sAttrValue - If the value is null the attribute is removed (if
present)@Nonnull public MicroElement setAttribute(@Nullable String sNamespaceURI, @Nonnull @Nonempty String sAttrName, @Nullable String sAttrValue)
IMicroElementsetAttribute in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - Name of the attribute. May neither be null nor empty.sAttrValue - If the value is null the attribute is removed (if
present)@Nonnull public MicroElement setAttribute(@Nonnull IMicroQName aAttrName, @Nullable String sAttrValue)
IMicroElementsetAttribute in interface IMicroElementaAttrName - Qualified name of the attribute. May neither be null
nor empty.sAttrValue - If the value is null the attribute is removed (if
present)@Nonnull public MicroElement setAttribute(@Nonnull String sAttrName, @Nonnull IHasAttributeValue aAttrValueProvider)
IMicroElementsetAttribute in interface IMicroElementsAttrName - Name of the attribute. May neither be null nor empty.aAttrValueProvider - The attribute value provider. May not be null. If the
contained attribute value is null the attribute is
removed (if present)@Nonnull public MicroElement setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, @Nonnull IHasAttributeValue aAttrValueProvider)
IMicroElementsetAttribute in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - Name of the attribute. May neither be null nor empty.aAttrValueProvider - The attribute value provider. May not be null. If the
contained attribute value is null the attribute is
removed (if present)@Nonnull public MicroElement setAttribute(@Nonnull IMicroQName aAttrName, @Nonnull IHasAttributeValue aAttrValueProvider)
IMicroElementsetAttribute in interface IMicroElementaAttrName - Qualified name of the attribute. May neither be null
nor empty.aAttrValueProvider - The attribute value provider. May not be null. If the
contained attribute value is null the attribute is
removed (if present)@Nonnull public IMicroElement setAttribute(@Nonnull String sAttrName, boolean bAttrValue)
IMicroElementsetAttribute(sAttrName, Boolean.toString (nValue)). That
means, that the serialized value of the attribute is either
true or false. If you need something else (like
"yes" or "no") don't use this method.setAttribute in interface IMicroElementsAttrName - Name of the attribute. May neither be null nor empty.bAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, boolean bAttrValue)
IMicroElementsetAttribute(sNamespaceURI, sAttrName, Boolean.toString (nValue))
. That means, that the serialized value of the attribute is either
true or false. If you need something else (like
"yes" or "no") don't use this method.setAttribute in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - Name of the attribute. May neither be null nor empty.bAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nonnull IMicroQName aAttrName, boolean bAttrValue)
IMicroElementsetAttribute(aAttrName, Boolean.toString (nValue)). That
means, that the serialized value of the attribute is either
true or false. If you need something else (like
"yes" or "no") don't use this method.setAttribute in interface IMicroElementaAttrName - Qualified name of the attribute. May neither be null
nor empty.bAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nonnull String sAttrName, int nAttrValue)
IMicroElementsetAttribute(sAttrName, Integer.toString (nValue)).setAttribute in interface IMicroElementsAttrName - Name of the attribute. May neither be null nor empty.nAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, int nAttrValue)
IMicroElementsetAttribute(sNamespaceURI, sAttrName, Integer.toString (nValue))
.setAttribute in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - Name of the attribute. May neither be null nor empty.nAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nonnull IMicroQName aAttrName, int nAttrValue)
IMicroElementsetAttribute(aAttrName, Integer.toString (nValue)).setAttribute in interface IMicroElementaAttrName - Qualified name of the attribute. May neither be null
nor empty.nAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nonnull String sAttrName, long nAttrValue)
IMicroElementsetAttribute(name, Long.toString (nValue)).setAttribute in interface IMicroElementsAttrName - Name of the attribute. May neither be null nor empty.nAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, long nAttrValue)
IMicroElementsetAttribute(name, Long.toString (nValue)).setAttribute in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - Name of the attribute. May neither be null nor empty.nAttrValue - The new value to be set.@Nonnull public IMicroElement setAttribute(@Nonnull IMicroQName aAttrName, long nAttrValue)
IMicroElementsetAttribute(name, Long.toString (nValue)).setAttribute in interface IMicroElementaAttrName - Qualified name of the attribute. May neither be null
nor empty.nAttrValue - The new value to be set.@Nonnull public IMicroElement setAttributeWithConversion(@Nonnull String sAttrName, @Nullable Object aAttrValue)
IMicroElementString, the TypeConverter is
invoked to convert it to a String object.setAttributeWithConversion in interface IMicroElementsAttrName - Name of the attribute. May neither be null nor empty.aAttrValue - If the value is null the attribute is removed (if
present)@Nonnull public IMicroElement setAttributeWithConversion(@Nullable String sNamespaceURI, @Nonnull String sAttrName, @Nullable Object aAttrValue)
IMicroElementString, the TypeConverter is
invoked to convert it to a String object.setAttributeWithConversion in interface IMicroElementsNamespaceURI - Namespace URI to use. May be null.sAttrName - Name of the attribute. May neither be null nor empty.aAttrValue - If the value is null the attribute is removed (if
present)@Nonnull public IMicroElement setAttributeWithConversion(@Nonnull IMicroQName aAttrName, @Nullable Object aAttrValue)
IMicroElementString, the TypeConverter is
invoked to convert it to a String object.setAttributeWithConversion in interface IMicroElementaAttrName - Qualified name of the attribute. May neither be null
nor empty.aAttrValue - If the value is null the attribute is removed (if
present)@Nonnull public EChange removeAllAttributes()
IMicroElementremoveAllAttributes in interface IMicroElementEChange.@Nullable public String getNamespaceURI()
IMicroElementgetNamespaceURI in interface IMicroElementnull if this element has no namespace URI.@Nonnull public EChange setNamespaceURI(@Nullable String sNamespaceURI)
IMicroElementsetNamespaceURI in interface IMicroElementsNamespaceURI - The namespace URI to be set. May be null or empty to
indicate that the namespace should be removed.EChangepublic boolean hasNamespaceURI()
IMicroElementhasNamespaceURI in interface IMicroElementtrue if this element has a specified namespace URI,
false otherwisepublic boolean hasNoNamespaceURI()
IMicroElementhasNoNamespaceURI in interface IMicroElementtrue if this element has no namespace URI,
false otherwisepublic boolean hasNamespaceURI(@Nullable String sNamespaceURI)
IMicroElementhasNamespaceURI in interface IMicroElementsNamespaceURI - The namespace URI to check. May not be null.true if this element has the specified namespace URI,
false otherwise@Nullable public String getLocalName()
IMicroElementIMicroElement.getTagName() but it is only present, if a namespace URI is
present.getLocalName in interface IMicroElementnull if no namespace is present.@Nonnull public String getTagName()
IMicroElementIMicroElement.getLocalName() if a namespace URI is present.getTagName in interface IMicroElementnull.@Nonnegative public int getChildElementCount()
getChildElementCount in interface IMicroElement@Nonnull @ReturnsMutableCopy public ICommonsList<IMicroElement> getAllChildElements()
IMicroElementgetAllChildElements in interface IMicroElementnull.@Nonnull @ReturnsMutableCopy public ICommonsList<IMicroElement> getAllChildElements(@Nullable String sTagName)
IMicroElementgetAllChildElements in interface IMicroElementsTagName - The tag name to check. May be null.null.@Nonnull @ReturnsMutableCopy public ICommonsList<IMicroElement> getAllChildElements(@Nullable String sNamespaceURI, @Nullable String sLocalName)
IMicroElementgetAllChildElements in interface IMicroElementsNamespaceURI - The namespace URI to check. May be null.sLocalName - The tag name to check. May be null.null.@Nonnull @ReturnsMutableCopy public ICommonsList<IMicroElement> getAllChildElementsRecursive()
IMicroElementgetAllChildElementsRecursive in interface IMicroElementnull but empty.public boolean hasChildElements()
IMicroElementhasChildElements in interface IMicroElementtrue if this element has at least one child elementpublic boolean hasChildElements(@Nullable String sTagName)
IMicroElementhasChildElements in interface IMicroElementsTagName - The tag name to check. May be null.true if this element has at least one child element
with the specified tag namepublic boolean hasChildElements(@Nullable String sNamespaceURI, @Nullable String sLocalName)
IMicroElementhasChildElements in interface IMicroElementsNamespaceURI - The namespace URI to check. May be null.sLocalName - The tag name to check. May be null.true if this element has at least one child element
with the specified namespace URI and tag name@Nullable public IMicroElement getFirstChildElement()
IMicroElementgetFirstChildElement in interface IMicroElementnull if this element has no
child element.@Nullable public IMicroElement getFirstChildElement(@Nullable String sTagName)
IMicroElementgetFirstChildElement in interface IMicroElementsTagName - The tag name of the element to search. May be null.null if no such child element is present@Nullable public IMicroElement getFirstChildElement(@Nullable String sNamespaceURI, @Nullable String sLocalName)
IMicroElementgetFirstChildElement in interface IMicroElementsNamespaceURI - The namespace URL to search.sLocalName - The tag name of the element to search.null if no such child element is present@Nonnull public IMicroElement getClone()
IMicroElementgetClone in interface ICloneable<IMicroNode>getClone in interface IMicroElementgetClone in interface IMicroNodeWithChildrenpublic boolean isEqualContent(@Nullable IMicroNode o)
IMicroNodeisEqualContent in interface IMicroNodeisEqualContent in class AbstractMicroNodeWithChildreno - The node to compare to this.true if the nodes are of the same type and the same
content, false otherwise.public String toString()
toString in class AbstractMicroNodeWithChildrenCopyright © 2014–2016 Philip Helger. All rights reserved.