Package com.deltaxml.dita.config
Class AttributeWithValue
java.lang.Object
com.deltaxml.dita.config.AttributeWithValue
Represents an XML Attribute name and value pair.
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeWithValue(String localName, String value) Constructs a new attribute with a name that is not in a namespace.AttributeWithValue(String namespaceURI, String prefix, String localName, String value) Constructs a new attribute with a name that is in a namespace. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines equality with another Object.Return the attribute's Clark Name.Return the attribute's localName.Return the attribute's namespaceURI.Return the attribute's prefix.getValue()Return the value of the attribute.inthashCode()The hashCode.toString()Returns an encoded String representing the attribute.
-
Constructor Details
-
AttributeWithValue
public AttributeWithValue(String namespaceURI, String prefix, String localName, String value) throws IllegalArgumentException Constructs a new attribute with a name that is in a namespace.- Parameters:
namespaceURI- the namespace in which the name is held.prefix- the prefix to map the namespaceURI to.localName- the name of the attribute.value- the String value of the attribute.- Throws:
IllegalArgumentException- if 1) a namespaceURI is defined and an empty (or null) prefix is defined or 2) a prefix is defined and an empty (or null) namespaceURI is defined or 3) a valid QName object cannot be created from the namespaceURI, prefix and localName.
-
AttributeWithValue
Constructs a new attribute with a name that is not in a namespace.- Parameters:
localName- the name of the attribute.value- the String value of the attribute.- Throws:
IllegalArgumentException- if a valid QName object cannot be created from the localName.
-
-
Method Details
-
getNamespaceURI
Return the attribute's namespaceURI.- Returns:
- a String representation of the namespaceURI.
-
getPrefix
Return the attribute's prefix.- Returns:
- a String representation of the prefix.
-
getLocalName
Return the attribute's localName.- Returns:
- a String representation of the localName.
-
getClarkName
Return the attribute's Clark Name. This is the name in the form {uri}localName.- Returns:
- a String representation of the Clark Name.
-
getValue
Return the value of the attribute.- Returns:
- the String value.
-
toString
Returns an encoded String representing the attribute. This encoded form is for internal use. -
equals
Determines equality with another Object. Used to ensure that Sets do not contain the same value twice. -
hashCode
public int hashCode()The hashCode. This is the hashCode of the underpinning qualified name (QName).
-