Package org.w3c.dom.mathml
Interface MathMLVectorElement
- All Superinterfaces:
Element,MathMLContentElement,MathMLElement,Node
vector is the container element for a vector.
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteComponent(int index) A convenience method to delete an element.getComponent(int index) A convenience method to retrieve a component.intThe number of components in the vector.insertComponent(MathMLContentElement newComponent, int index) A convenience method to insert a new component in the vector before the current index-th component.removeComponent(int index) A convenience method to remove a component from a vector and return it to the caller.setComponent(MathMLContentElement newComponent, int index) A convenience method to set the index-th component of the vector to newComponent.Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface org.w3c.dom.mathml.MathMLElement
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXrefMethods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Method Details
-
getNcomponents
int getNcomponents()The number of components in the vector.- Returns:
- value of the ncomponents attribute.
-
getComponent
A convenience method to retrieve a component.- Parameters:
index- Position of the component in the list of components. The first element is numbered 1.- Returns:
- The MathMLContentElement component at the position specified by index. If index is not a valid index (i.e. is greater than the number of components of the vector or less than 1), a null MathMLContentElement is returned.
-
insertComponent
MathMLContentElement insertComponent(MathMLContentElement newComponent, int index) throws DOMException A convenience method to insert a new component in the vector before the current index-th component. If index is 0 or is one more than the number of components currently in the vector, newComponent is appended as the last component of the vector.- Parameters:
newComponent- A MathMLContentElement representing the component that is to be added.index- Position of the component in the list of components. The first component is numbered 1.- Returns:
- The MathMLContentElement child of this MathMLVectorElement representing the new component in the DOM.
- Throws:
DOMException- INDEX_SIZE_ERR: Raised if index is greater than one more than the current number of components of this vector element.
-
setComponent
A convenience method to set the index-th component of the vector to newComponent. If index is one more than the current number of components, newComponent is appended as the last component.- Parameters:
newComponent- A MathMLContentElement representing the element that is to be the index-th component of the vector.index- Position of the component in the list of components. The first element is numbered 1.- Returns:
- The MathMLContentElement child of this MathMLVectorElement that represents the new component in the DOM.
- Throws:
DOMException- INDEX_SIZE_ERR: Raised if index is greater than one more than the current number of components of this vector element.
-
deleteComponent
A convenience method to delete an element. The deletion changes the indices of the following components.- Parameters:
index- Position of the component in the vector. The position of the first component is 1- Throws:
DOMException- INDEX_SIZE_ERR: Raised if index is greater than the current number of components of this vector element.
-
removeComponent
A convenience method to remove a component from a vector and return it to the caller. If index is greater than the number of components or is 0, a null MathMLContentElement is returned.- Parameters:
index- Position of the component in the list of components. The first element is numbered 1.- Returns:
- The MathMLContentElement component being removed.
-