Package com.helger.xml.microdom
Interface IMicroAttributeContainer<IMPLTYPE extends IMicroAttributeContainer<IMPLTYPE>>
- Type Parameters:
IMPLTYPE- implementation type
- All Superinterfaces:
com.helger.commons.lang.ICloneable<IMicroNode>,com.helger.commons.hierarchy.IHasChildren<IMicroNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IMicroNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IMicroNode>,com.helger.commons.hierarchy.IHasParent<IMicroNode>,IMicroNode
- All Known Subinterfaces:
IMicroElement
- All Known Implementing Classes:
MicroElement
public interface IMicroAttributeContainer<IMPLTYPE extends IMicroAttributeContainer<IMPLTYPE>>
extends IMicroNode
Interface for objects having attributes. Currently this is only an element.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionvoidforAllAttributes(com.helger.commons.functional.ITriConsumer<? super String, ? super String, ? super String> aConsumer) Iterate all attribute objects.voidforAllAttributes(BiConsumer<? super IMicroQName, ? super String> aConsumer) Iterate all attribute objects.voidforAllAttributes(Consumer<? super IMicroAttribute> aConsumer) Iterate all attribute objects.com.helger.commons.collection.impl.ICommonsList<? extends IMicroAttribute>Get a list of all attributes.com.helger.commons.collection.impl.ICommonsOrderedSet<IMicroQName>Get a set of all attribute names.com.helger.commons.collection.impl.ICommonsOrderedMap<IMicroQName,String> Get a map of all fully qualified attribute names and values.intgetAttributeObj(IMicroQName aAttrName) Get the attribute object with the specified qualified name.default IMicroAttributegetAttributeObj(String sAttrName) Get the attribute object with the specified name.default IMicroAttributegetAttributeObj(String sNamespaceURI, String sAttrName) Get the attribute object with the specified namespace URI and local name.Iterable<? extends IMicroAttribute>Get a iterable objects of all attributes.default StringgetAttributeValue(IMicroQName aAttrName) Get the attribute value of the given attribute name.default StringgetAttributeValue(String sAttrName) Get the attribute value of the given attribute name.default StringgetAttributeValue(String sNamespaceURI, String sAttrName) Get the attribute value of the given attribute name.default booleangetAttributeValueAsBool(IMicroQName aAttrName, boolean bDefault) default booleangetAttributeValueAsBool(String sAttrName, boolean bDefault) default booleangetAttributeValueAsBool(String sNamespaceURI, String sAttrName, boolean bDefault) default doublegetAttributeValueAsDouble(IMicroQName aAttrName, double dDefault) default doublegetAttributeValueAsDouble(String sAttrName, double dDefault) default doublegetAttributeValueAsDouble(String sNamespaceURI, String sAttrName, double dDefault) default floatgetAttributeValueAsFloat(IMicroQName aAttrName, float fDefault) default floatgetAttributeValueAsFloat(String sAttrName, float fDefault) default floatgetAttributeValueAsFloat(String sNamespaceURI, String sAttrName, float fDefault) default intgetAttributeValueAsInt(IMicroQName aAttrName, int nDefault) default intgetAttributeValueAsInt(String sAttrName, int nDefault) default intgetAttributeValueAsInt(String sNamespaceURI, String sAttrName, int nDefault) default longgetAttributeValueAsLong(IMicroQName aAttrName, long nDefault) default longgetAttributeValueAsLong(String sAttrName, long nDefault) default longgetAttributeValueAsLong(String sNamespaceURI, String sAttrName, long nDefault) <DSTTYPE> DSTTYPEgetAttributeValueWithConversion(IMicroQName aAttrName, Class<DSTTYPE> aDstClass) Get the attribute value of the given attribute name.default <DSTTYPE> DSTTYPEgetAttributeValueWithConversion(String sAttrName, Class<DSTTYPE> aDstClass) Get the attribute value of the given attribute name.default <DSTTYPE> DSTTYPEgetAttributeValueWithConversion(String sNamespaceURI, String sAttrName, Class<DSTTYPE> aDstClass) Get the attribute value of the given attribute name.booleanhasAttribute(IMicroQName aAttrName) Check if this element has an attribute with the specified name.default booleanhasAttribute(String sAttrName) Check if this element has an attribute with the specified name.default booleanhasAttribute(String sNamespaceURI, String sAttrName) Check if this element has an attribute with the specified name.booleanbooleancom.helger.commons.state.EChangeRemove all attributes from this elementcom.helger.commons.state.EChangeremoveAttribute(IMicroQName aAttrName) Remove the attribute with the given name.default com.helger.commons.state.EChangeremoveAttribute(String sAttrName) Remove the attribute with the given name.default com.helger.commons.state.EChangeremoveAttribute(String sNamespaceURI, String sAttrName) Remove the attribute with the given name.default IMPLTYPEsetAttribute(IMicroQName aAttrName, boolean bAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(IMicroQName aAttrName, double dAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(IMicroQName aAttrName, float fAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(IMicroQName aAttrName, int nAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(IMicroQName aAttrName, long nAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(IMicroQName aAttrName, IHasAttributeValue aAttrValueProvider) Set an attribute value of this element.setAttribute(IMicroQName aAttrName, String sAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sAttrName, boolean bAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sAttrName, double dAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sAttrName, float fAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sAttrName, int nAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sAttrName, long nAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sAttrName, IHasAttributeValue aAttrValueProvider) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sAttrName, String sAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sNamespaceURI, String sAttrName, boolean bAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sNamespaceURI, String sAttrName, double dAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sNamespaceURI, String sAttrName, float fAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sNamespaceURI, String sAttrName, int nAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sNamespaceURI, String sAttrName, long nAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sNamespaceURI, String sAttrName, IHasAttributeValue aAttrValueProvider) Set an attribute value of this element.default IMPLTYPEsetAttribute(String sNamespaceURI, String sAttrName, String sAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttributeWithConversion(IMicroQName aAttrName, Object aAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttributeWithConversion(IMicroQName aAttrName, String sAttrValue) Deprecated.default IMPLTYPEsetAttributeWithConversion(String sAttrName, Object aAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttributeWithConversion(String sAttrName, String sAttrValue) Deprecated.Don't call this; CallsetAttribute(String, String)directlydefault IMPLTYPEsetAttributeWithConversion(String sNamespaceURI, String sAttrName, Object aAttrValue) Set an attribute value of this element.default IMPLTYPEsetAttributeWithConversion(String sNamespaceURI, String sAttrName, String sAttrValue) Deprecated.Don't call this; CallsetAttribute(String, String, String)directly.Methods inherited from interface com.helger.commons.lang.ICloneable
getCloneMethods inherited from interface com.helger.commons.hierarchy.IHasChildren
forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getChildCount, getChildren, hasChildren, hasNoChildrenMethods inherited from interface com.helger.commons.hierarchy.IHasChildrenRecursive
forAllChildrenRecursive, forAllChildrenRecursiveMethods inherited from interface com.helger.commons.hierarchy.IHasChildrenSorted
findFirstChild, findFirstChildMapped, getChildAtIndexMethods inherited from interface com.helger.xml.microdom.IMicroNode
appendCDATA, appendCDATA, appendCDATA, appendCDATAWithConversion, appendChild, appendChildren, appendChildren, appendComment, appendComment, appendComment, appendCommentWithConversion, appendContainer, appendElement, appendElement, appendEntityReference, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendProcessingInstruction, appendText, appendText, appendText, appendTextWithConversion, containsAnyChild, detachFromParent, findParentElement, getAllChildren, getAllChildrenRecursive, getAllEventTargets, getAllEventTargets, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeValue, getParent, getParentElementWithName, getParentElementWithName, getPreviousSibling, getType, hasParent, insertAfter, insertAtIndex, insertBefore, isCDATA, isComment, isContainer, isDocument, isDocumentType, isElement, isEntityReference, isEqualContent, isProcessingInstruction, isText, registerEventTarget, removeAllChildren, removeChild, removeChildAtIndex, replaceChild, unregisterEventTarget
-
Method Details
-
hasAttributes
boolean hasAttributes()- Returns:
trueif this element has at least one attribute,falseotherwise
-
hasNoAttributes
boolean hasNoAttributes()- Returns:
trueif this element has no attribute,falseif at least one attribute is present.
-
getAttributeCount
- Returns:
- The number of assigned attributes. Always ≥ 0.
-
hasAttribute
Check if this element has an attribute with the specified name.- Parameters:
sAttrName- The attribute name to check.- Returns:
trueif such an attribute is present,falseotherwise
-
hasAttribute
Check if this element has an attribute with the specified name.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- The attribute name to check.- Returns:
trueif such an attribute is present,falseotherwise
-
hasAttribute
Check if this element has an attribute with the specified name.- Parameters:
aAttrName- The qualified attribute name to check. May benull.- Returns:
trueif such an attribute is present,falseotherwise
-
getAttributeObj
Get the attribute object with the specified name.- Parameters:
sAttrName- The attribute locale name to query. May benull.- Returns:
nullof no such attribute object exists.
-
getAttributeObj
@Nullable default IMicroAttribute getAttributeObj(@Nullable String sNamespaceURI, @Nullable String sAttrName) Get the attribute object with the specified namespace URI and local name.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- The attribute locale name to query. May benull.- Returns:
nullof no such attribute object exists.
-
getAttributeObj
Get the attribute object with the specified qualified name.- Parameters:
aAttrName- The qualified attribute name to check. May benull.- Returns:
nullof no such attribute object exists.
-
getAttributeValue
Get the attribute value of the given attribute name. If this element has no such attribute,nullis returned.- Parameters:
sAttrName- The attribute name to retrieve the value of.- Returns:
- The assigned attribute value or
null.
-
getAttributeValue
@Nullable default String getAttributeValue(@Nullable String sNamespaceURI, @Nullable String sAttrName) Get the attribute value of the given attribute name. If this element has no such attribute,nullis returned.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- The attribute name to retrieve the value of.- Returns:
- The assigned attribute value or
null.
-
getAttributeValue
Get the attribute value of the given attribute name. If this element has no such attribute,nullis returned.- Parameters:
aAttrName- The qualified attribute name to retrieve the value of. May benull.- Returns:
- The assigned attribute value or
null.
-
getAttributeValueWithConversion
@Nullable default <DSTTYPE> DSTTYPE getAttributeValueWithConversion(@Nullable String sAttrName, @Nonnull Class<DSTTYPE> aDstClass) Get the attribute value of the given attribute name. If this element has no such attribute,nullis returned. The attribute value is converted via theTypeConverterto the desired destination class. If no such attribute is present,nullis returned.- Type Parameters:
DSTTYPE- Destination type- Parameters:
sAttrName- The attribute name to retrieve the value of.aDstClass- The destination class.- Returns:
- The assigned attribute value or
null. - Throws:
ClassCastException- if the value cannot be converted
-
getAttributeValueWithConversion
@Nullable default <DSTTYPE> DSTTYPE getAttributeValueWithConversion(@Nullable String sNamespaceURI, @Nullable String sAttrName, @Nonnull Class<DSTTYPE> aDstClass) Get the attribute value of the given attribute name. If this element has no such attribute,nullis returned. The attribute value is converted via theTypeConverterto the desired destination class. If no such attribute is present,nullis returned.- Type Parameters:
DSTTYPE- Destination type- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- The attribute name to retrieve the value of.aDstClass- The destination class.- Returns:
- The assigned attribute value or
null. - Throws:
ClassCastException- if the value cannot be converted
-
getAttributeValueWithConversion
@Nullable <DSTTYPE> DSTTYPE getAttributeValueWithConversion(@Nullable IMicroQName aAttrName, @Nonnull Class<DSTTYPE> aDstClass) Get the attribute value of the given attribute name. If this element has no such attribute,nullis returned. The attribute value is converted via theTypeConverterto the desired destination class. If no such attribute is present,nullis returned.- Type Parameters:
DSTTYPE- Destination type- Parameters:
aAttrName- The attribute qualified name to retrieve the value of.aDstClass- The destination class.- Returns:
- The assigned attribute value or
null. - Throws:
ClassCastException- if the value cannot be converted
-
getAttributeValueAsBool
-
getAttributeValueAsBool
-
getAttributeValueAsBool
-
getAttributeValueAsDouble
-
getAttributeValueAsDouble
-
getAttributeValueAsDouble
-
getAttributeValueAsFloat
-
getAttributeValueAsFloat
-
getAttributeValueAsFloat
-
getAttributeValueAsInt
-
getAttributeValueAsInt
-
getAttributeValueAsInt
-
getAttributeValueAsLong
-
getAttributeValueAsLong
-
getAttributeValueAsLong
-
getAttributeObjs
Get a iterable objects of all attributes. Is ensured to be notnullifhasAttributes()returnstrue.- Returns:
- May be
null.
-
getAllAttributeObjs
@Nullable @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsList<? extends IMicroAttribute> getAllAttributeObjs()- Returns:
- May be
null.
-
getAllQAttributes
@Nullable @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedMap<IMicroQName,String> getAllQAttributes()Get a map of all fully qualified attribute names and values. Is ensured to be notnullifhasAttributes()returnstrue.- Returns:
- May be
null.
-
getAllAttributeQNames
@Nullable @ReturnsMutableCopy com.helger.commons.collection.impl.ICommonsOrderedSet<IMicroQName> getAllAttributeQNames()- Returns:
- May be
null.
-
forAllAttributes
Iterate all attribute objects.- Parameters:
aConsumer- The consumer. May not benull. May only perform reading operations!
-
forAllAttributes
Iterate all attribute objects.- Parameters:
aConsumer- The consumer that takes the QName and the value. May not benull. May only perform reading operations!
-
forAllAttributes
void forAllAttributes(@Nonnull com.helger.commons.functional.ITriConsumer<? super String, ? super String, ? super String> aConsumer) Iterate all attribute objects.- Parameters:
aConsumer- The consumer that takes the namespace URI, the attribute local name and the attribute value. May not benull. May only perform reading operations!
-
setAttribute
Set an attribute value of this element.- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.sAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, @Nullable String sAttrValue) Set an attribute value of this element.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.sAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttribute
Set an attribute value of this element.- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.sAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nonnull String sAttrName, @Nonnull IHasAttributeValue aAttrValueProvider) Set an attribute value of this element.- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.aAttrValueProvider- The attribute value provider. May not benull. If the contained attribute value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, @Nonnull IHasAttributeValue aAttrValueProvider) Set an attribute value of this element.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.aAttrValueProvider- The attribute value provider. May not benull. If the contained attribute value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nonnull IMicroQName aAttrName, @Nonnull IHasAttributeValue aAttrValueProvider) Set an attribute value of this element.- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.aAttrValueProvider- The attribute value provider. May not benull. If the contained attribute value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(sAttrName, Boolean.toString (nValue)). That means, that the serialized value of the attribute is eithertrueorfalse. If you need something else (like "yes" or "no") don't use this method.- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.bAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, boolean bAttrValue) Set an attribute value of this element. This is a shortcut forsetAttribute(sNamespaceURI, sAttrName, Boolean.toString (nValue)). That means, that the serialized value of the attribute is eithertrueorfalse. If you need something else (like "yes" or "no") don't use this method.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.bAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(aAttrName, Boolean.toString (nValue)). That means, that the serialized value of the attribute is eithertrueorfalse. If you need something else (like "yes" or "no") don't use this method.- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.bAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(sAttrName, Double.toString (nValue)).- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.dAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, double dAttrValue) Set an attribute value of this element. This is a shortcut forsetAttribute(sNamespaceURI, sAttrName, Double.toString (nValue)).- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.dAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(aAttrName, Double.toString (nValue)).- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.dAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(sAttrName, Float.toString (nValue)).- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.fAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, float fAttrValue) Set an attribute value of this element. This is a shortcut forsetAttribute(sNamespaceURI, sAttrName, Float.toString (nValue)).- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.fAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(aAttrName, Float.toString (nValue)).- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.fAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(sAttrName, Integer.toString (nValue)).- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.nAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, int nAttrValue) Set an attribute value of this element. This is a shortcut forsetAttribute(sNamespaceURI, sAttrName, Integer.toString (nValue)).- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.nAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(aAttrName, Integer.toString (nValue)).- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.nAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(name, Long.toString (nValue)).- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.nAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
@Nonnull default IMPLTYPE setAttribute(@Nullable String sNamespaceURI, @Nonnull String sAttrName, long nAttrValue) Set an attribute value of this element. This is a shortcut forsetAttribute(name, Long.toString (nValue)).- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.nAttrValue- The new value to be set.- Returns:
- this
-
setAttribute
Set an attribute value of this element. This is a shortcut forsetAttribute(name, Long.toString (nValue)).- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.nAttrValue- The new value to be set.- Returns:
- this
-
setAttributeWithConversion
@Nonnull default IMPLTYPE setAttributeWithConversion(@Nonnull String sAttrName, @Nullable Object aAttrValue) Set an attribute value of this element. If the type of the value is notString, theTypeConverteris invoked to convert it to aStringobject.- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.aAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttributeWithConversion
@Deprecated(forRemoval=false) @Nonnull @DevelopersNote("No need for setAttributeWithConversion - setAttribute is enough") default IMPLTYPE setAttributeWithConversion(@Nonnull String sAttrName, @Nullable String sAttrValue) Deprecated.Don't call this; CallsetAttribute(String, String)directlySet an attribute value of this element.- Parameters:
sAttrName- Name of the attribute. May neither benullnor empty.sAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttributeWithConversion
@Nonnull default IMPLTYPE setAttributeWithConversion(@Nullable String sNamespaceURI, @Nonnull String sAttrName, @Nullable Object aAttrValue) Set an attribute value of this element. If the type of the value is notString, theTypeConverteris invoked to convert it to aStringobject.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.aAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttributeWithConversion
@Deprecated(forRemoval=false) @Nonnull @DevelopersNote("No need for setAttributeWithConversion - setAttribute is enough") default IMPLTYPE setAttributeWithConversion(@Nullable String sNamespaceURI, @Nonnull String sAttrName, @Nullable String sAttrValue) Deprecated.Don't call this; CallsetAttribute(String, String, String)directly.Set an attribute value of this element.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- Name of the attribute. May neither benullnor empty.sAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttributeWithConversion
@Nonnull default IMPLTYPE setAttributeWithConversion(@Nonnull IMicroQName aAttrName, @Nullable Object aAttrValue) Set an attribute value of this element. If the type of the value is notString, theTypeConverteris invoked to convert it to aStringobject.- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.aAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
setAttributeWithConversion
@Deprecated(forRemoval=false) @Nonnull @DevelopersNote("No need for setAttributeWithConversion - setAttribute is enough") default IMPLTYPE setAttributeWithConversion(@Nonnull IMicroQName aAttrName, @Nullable String sAttrValue) Deprecated.Don't call this; CallsetAttribute(IMicroQName, String)directly.Set an attribute value of this element.- Parameters:
aAttrName- Qualified name of the attribute. May neither benullnor empty.sAttrValue- If the value isnullthe attribute is removed (if present)- Returns:
- this
-
removeAttribute
Remove the attribute with the given name.- Parameters:
sAttrName- The name of the attribute to be removed. May benull.- Returns:
EChange.CHANGEDif the attribute was removed,EChange.UNCHANGEDif no such attribute exists at this element.
-
removeAttribute
@Nonnull default com.helger.commons.state.EChange removeAttribute(@Nullable String sNamespaceURI, @Nullable String sAttrName) Remove the attribute with the given name.- Parameters:
sNamespaceURI- Namespace URI to use. May benull.sAttrName- The name of the attribute to be removed. May benull.- Returns:
EChange.CHANGEDif the attribute was removed,EChange.UNCHANGEDif no such attribute exists at this element.
-
removeAttribute
Remove the attribute with the given name.- Parameters:
aAttrName- The qualified name of the attribute to be removed. May benull.- Returns:
EChange.CHANGEDif the attribute was removed,EChange.UNCHANGEDif no such attribute exists at this element.
-
removeAllAttributes
Remove all attributes from this element- Returns:
EChange.
-
setAttribute(IMicroQName, String)directly.